1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +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

@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.274 2004/01/06 04:31:01 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.275 2004/01/06 23:55:18 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1878,7 +1878,7 @@ _copyCreateFunctionStmt(CreateFunctionStmt *from)
COPY_SCALAR_FIELD(replace);
COPY_NODE_FIELD(funcname);
COPY_NODE_FIELD(argTypes);
COPY_NODE_FIELD(parameters);
COPY_NODE_FIELD(returnType);
COPY_NODE_FIELD(options);
COPY_NODE_FIELD(withClause);
@ -1886,6 +1886,17 @@ _copyCreateFunctionStmt(CreateFunctionStmt *from)
return newnode;
}
static FunctionParameter *
_copyFunctionParameter(FunctionParameter *from)
{
FunctionParameter *newnode = makeNode(FunctionParameter);
COPY_STRING_FIELD(name);
COPY_NODE_FIELD(argType);
return newnode;
}
static RemoveAggrStmt *
_copyRemoveAggrStmt(RemoveAggrStmt *from)
{
@ -2788,6 +2799,9 @@ copyObject(void *from)
case T_CreateFunctionStmt:
retval = _copyCreateFunctionStmt(from);
break;
case T_FunctionParameter:
retval = _copyFunctionParameter(from);
break;
case T_RemoveAggrStmt:
retval = _copyRemoveAggrStmt(from);
break;