1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-02 23:42:46 +03:00

Officially decouple FUNC_MAX_ARGS from INDEX_MAX_KEYS, and set the

former to 100 by default.  Clean up some of the less necessary
dependencies on FUNC_MAX_ARGS; however, the biggie (FunctionCallInfoData)
remains.
This commit is contained in:
Tom Lane
2005-03-29 03:01:32 +00:00
parent 4f6f5db474
commit 8c85a34a3b
15 changed files with 100 additions and 97 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.91 2005/03/29 00:17:15 tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.92 2005/03/29 03:01:31 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -337,9 +337,9 @@ fmgr_info_C_lang(Oid functionId, FmgrInfo *finfo, HeapTuple procedureTuple)
/* Old style: need to use a handler */
finfo->fn_addr = fmgr_oldstyle;
fnextra = (Oldstyle_fnextra *)
MemoryContextAlloc(finfo->fn_mcxt, sizeof(Oldstyle_fnextra));
MemoryContextAllocZero(finfo->fn_mcxt,
sizeof(Oldstyle_fnextra));
finfo->fn_extra = (void *) fnextra;
MemSet(fnextra, 0, sizeof(Oldstyle_fnextra));
fnextra->func = (func_ptr) user_fn;
for (i = 0; i < procedureStruct->pronargs; i++)
{
@@ -795,8 +795,8 @@ fmgr_security_definer(PG_FUNCTION_ARGS)
if (!fcinfo->flinfo->fn_extra)
{
fcache = MemoryContextAlloc(fcinfo->flinfo->fn_mcxt, sizeof(*fcache));
memset(fcache, 0, sizeof(*fcache));
fcache = MemoryContextAllocZero(fcinfo->flinfo->fn_mcxt,
sizeof(*fcache));
fmgr_info_cxt_security(fcinfo->flinfo->fn_oid, &fcache->flinfo,
fcinfo->flinfo->fn_mcxt, true);