summaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-06 23:55:19 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-06 23:55:19 +0000
commita77e32d7c5615e302fbc87803086132f1dab99a9 (patch)
treeb03a6846d6909d6b1acb81c82a1e8fe3b98dbbb2 /src/backend/nodes/copyfuncs.c
parent488f2785d025a6cc04685cfee4ca3eac0086e2fd (diff)
downloadpostgresql-a77e32d7c5615e302fbc87803086132f1dab99a9.tar.gz
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.
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 18a8a369e6..b47c51e462 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -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;