From c53d6e927f5ebdbd89d59cb8837ad51ab603a9d7 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 14 May 2004 16:11:25 +0000 Subject: Tighten parsing of boolean options to CREATE TYPE and related functions, so as to deliver more useful error messages for mistakes like 'PASSEDBYVALUE = f'. Per gripe from Gaetano Mendola. --- src/backend/commands/functioncmds.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/backend/commands/functioncmds.c') diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index a0a9c582409..c118e8e3b5e 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.45 2004/05/07 00:24:57 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.46 2004/05/14 16:11:25 tgl Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -329,11 +329,12 @@ compute_attributes_with_style(List *parameters, bool *isStrict_p, char *volatili DefElem *param = (DefElem *) lfirst(pl); if (pg_strcasecmp(param->defname, "isstrict") == 0) - *isStrict_p = true; + *isStrict_p = defGetBoolean(param); else if (pg_strcasecmp(param->defname, "iscachable") == 0) { /* obsolete spelling of isImmutable */ - *volatility_p = PROVOLATILE_IMMUTABLE; + if (defGetBoolean(param)) + *volatility_p = PROVOLATILE_IMMUTABLE; } else ereport(WARNING, -- cgit v1.2.3