mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
Apply the core parts of Dennis Bjorklund's patch to allow function
parameters to be declared with names. pg_proc has a column to store names, and CREATE FUNCTION can insert data into it, but that's all as yet. I need to do more work on the pg_dump and plpgsql portions of the patch before committing those, but I thought I'd get the bulky changes in before the tree drifts under me. initdb forced due to pg_proc change.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/sets.c,v 1.61 2003/11/29 19:51:59 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/sets.c,v 1.62 2004/01/06 23:55:18 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -65,8 +65,9 @@ SetDefine(char *querystr, Oid elemType)
|
||||
false, /* security invoker */
|
||||
false, /* isStrict (irrelevant, no args) */
|
||||
PROVOLATILE_VOLATILE, /* assume unsafe */
|
||||
0, /* parameterCount */
|
||||
NULL); /* parameterTypes */
|
||||
0, /* parameterCount */
|
||||
NULL, /* parameterTypes */
|
||||
NULL); /* parameterNames */
|
||||
|
||||
/*
|
||||
* Since we're still inside this command of the transaction, we can't
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.77 2003/11/29 19:52:01 pgsql Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.78 2004/01/06 23:55:19 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -155,6 +155,8 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
|
||||
const FmgrBuiltin *fbp;
|
||||
HeapTuple procedureTuple;
|
||||
Form_pg_proc procedureStruct;
|
||||
Datum prosrcdatum;
|
||||
bool isnull;
|
||||
char *prosrc;
|
||||
|
||||
/*
|
||||
@@ -214,8 +216,12 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
|
||||
* name of the internal function is stored in prosrc (it
|
||||
* doesn't have to be the same as the name of the alias!)
|
||||
*/
|
||||
prosrcdatum = SysCacheGetAttr(PROCOID, procedureTuple,
|
||||
Anum_pg_proc_prosrc, &isnull);
|
||||
if (isnull)
|
||||
elog(ERROR, "null prosrc");
|
||||
prosrc = DatumGetCString(DirectFunctionCall1(textout,
|
||||
PointerGetDatum(&procedureStruct->prosrc)));
|
||||
prosrcdatum));
|
||||
fbp = fmgr_lookupByName(prosrc);
|
||||
if (fbp == NULL)
|
||||
ereport(ERROR,
|
||||
|
||||
Reference in New Issue
Block a user