From eb47ee486538fb0ea81917b3e35d6cff9f7a0ec7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 29 Mar 2005 17:58:51 +0000 Subject: 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. --- src/backend/commands/functioncmds.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/backend/commands/functioncmds.c') 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)) { -- cgit v1.2.3