diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-29 17:58:51 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-03-29 17:58:51 +0000 |
commit | eb47ee486538fb0ea81917b3e35d6cff9f7a0ec7 (patch) | |
tree | 1d1b5d430cd47dc9fc05fdd914a15351728d4596 /src/backend/commands/functioncmds.c | |
parent | 8c85a34a3b945059e1bc03e2f0988b8092a365fd (diff) | |
download | postgresql-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/backend/commands/functioncmds.c')
-rw-r--r-- | src/backend/commands/functioncmds.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 069adf46af5..c2c521bbfea 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.57 2005/03/29 00:16:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.58 2005/03/29 17:58:49 tgl Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -154,6 +154,15 @@ examine_parameter_list(List *parameter, Oid languageOid, errmsg("functions cannot have more than %d arguments", FUNC_MAX_ARGS))); + if (fp->mode == FUNC_PARAM_OUT) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("CREATE FUNCTION / OUT parameters are not implemented"))); + if (fp->mode == FUNC_PARAM_INOUT) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("CREATE FUNCTION / INOUT parameters are not implemented"))); + toid = LookupTypeName(t); if (OidIsValid(toid)) { |