summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorTom Lane2004-01-06 23:55:19 +0000
committerTom Lane2004-01-06 23:55:19 +0000
commita77e32d7c5615e302fbc87803086132f1dab99a9 (patch)
treeb03a6846d6909d6b1acb81c82a1e8fe3b98dbbb2 /src/include/nodes
parent488f2785d025a6cc04685cfee4ca3eac0086e2fd (diff)
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/include/nodes')
-rw-r--r--src/include/nodes/nodes.h3
-rw-r--r--src/include/nodes/parsenodes.h12
2 files changed, 12 insertions, 3 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index a162c5a93a4..cc4d3fe9331 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.148 2003/11/29 22:41:06 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/nodes.h,v 1.149 2004/01/06 23:55:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -283,6 +283,7 @@ typedef enum NodeTag
T_CreateOpClassItem,
T_CompositeTypeStmt,
T_InhRelation,
+ T_FunctionParameter,
/*
* TAGS FOR FUNCTION-CALL CONTEXT AND RESULTINFO NODES (see fmgr.h)
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index e6ec1fcd2f5..9e6e66a337c 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.250 2003/11/29 22:41:06 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.251 2004/01/06 23:55:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1294,12 +1294,20 @@ typedef struct CreateFunctionStmt
NodeTag type;
bool replace; /* T => replace if already exists */
List *funcname; /* qualified name of function to create */
- List *argTypes; /* list of argument types (TypeName nodes) */
+ List *parameters; /* a list of FunctionParameter */
TypeName *returnType; /* the return type */
List *options; /* a list of DefElem */
List *withClause; /* a list of DefElem */
} CreateFunctionStmt;
+typedef struct FunctionParameter
+{
+ NodeTag type;
+ char *name; /* parameter name, or NULL if not given */
+ TypeName *argType; /* TypeName for parameter type */
+ /* someday add IN/OUT/INOUT indicator here */
+} FunctionParameter;
+
/* ----------------------
* Drop Aggregate Statement
* ----------------------