aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-29 17:58:51 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-29 17:58:51 +0000
commiteb47ee486538fb0ea81917b3e35d6cff9f7a0ec7 (patch)
tree1d1b5d430cd47dc9fc05fdd914a15351728d4596 /src/include
parent8c85a34a3b945059e1bc03e2f0988b8092a365fd (diff)
downloadpostgresql-eb47ee486538fb0ea81917b3e35d6cff9f7a0ec7.tar.gz
postgresql-eb47ee486538fb0ea81917b3e35d6cff9f7a0ec7.zip
Fix grammar for IN/OUT/INOUT parameters. This commit doesn't actually
implement any new feature, it just pushes the 'not implemented' error message deeper into the backend. I also tweaked the grammar to accept Oracle-ish parameter syntax (parameter name first), as well as the SQL99 standard syntax (parameter mode first), since it was easy and people will doubtless try to use both anyway.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/nodes/parsenodes.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h
index 8cf274b14ce..a6a79e3a4fa 100644
--- a/src/include/nodes/parsenodes.h
+++ b/src/include/nodes/parsenodes.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.274 2005/03/14 00:19:37 neilc Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.275 2005/03/29 17:58:51 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -899,6 +899,11 @@ typedef struct PrivGrantee
char *groupname;
} PrivGrantee;
+/*
+ * Note: FuncWithArgs carries only the types of the input parameters of the
+ * function. So it is sufficient to identify an existing function, but it
+ * is not enough info to define a function nor to call it.
+ */
typedef struct FuncWithArgs
{
NodeTag type;
@@ -1389,12 +1394,20 @@ typedef struct CreateFunctionStmt
List *withClause; /* a list of DefElem */
} CreateFunctionStmt;
+typedef enum FunctionParameterMode
+{
+ /* the assigned enum values appear in pg_proc, don't change 'em! */
+ FUNC_PARAM_IN = 'i', /* input only */
+ FUNC_PARAM_OUT = 'o', /* output only */
+ FUNC_PARAM_INOUT = 'b' /* both */
+} FunctionParameterMode;
+
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 */
+ FunctionParameterMode mode; /* IN/OUT/INOUT */
} FunctionParameter;
typedef struct AlterFunctionStmt