1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +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:
Tom Lane
2004-01-06 23:55:19 +00:00
parent 488f2785d0
commit a77e32d7c5
20 changed files with 1841 additions and 1650 deletions

View File

@ -29,7 +29,7 @@
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.43 2004/01/04 00:14:17 momjian Exp $
* $PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.44 2004/01/06 23:55:19 tgl Exp $
*
*********************************************************************
*/
@ -1032,7 +1032,8 @@ PLy_procedure_create(FunctionCallInfo fcinfo, Oid tgreloid,
Form_pg_proc procStruct;
PLyProcedure *volatile proc;
char *volatile procSource = NULL;
Datum procDatum;
Datum prosrcdatum;
bool isnull;
int i,
rv;
@ -1153,9 +1154,12 @@ PLy_procedure_create(FunctionCallInfo fcinfo, Oid tgreloid,
/*
* get the text of the function.
*/
procDatum = DirectFunctionCall1(textout,
PointerGetDatum(&procStruct->prosrc));
procSource = DatumGetCString(procDatum);
prosrcdatum = SysCacheGetAttr(PROCOID, procTup,
Anum_pg_proc_prosrc, &isnull);
if (isnull)
elog(ERROR, "null prosrc");
procSource = DatumGetCString(DirectFunctionCall1(textout,
prosrcdatum));
PLy_procedure_compile(proc, procSource);