aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/functioncmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-05-14 16:11:25 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-05-14 16:11:25 +0000
commitc53d6e927f5ebdbd89d59cb8837ad51ab603a9d7 (patch)
treed59bb6bf099cad146bfe49c19596f3e8cad63525 /src/backend/commands/functioncmds.c
parent89a8e1567174a265790e8f507c0db86bcb9f9d6b (diff)
downloadpostgresql-c53d6e927f5ebdbd89d59cb8837ad51ab603a9d7.tar.gz
postgresql-c53d6e927f5ebdbd89d59cb8837ad51ab603a9d7.zip
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.
Diffstat (limited to 'src/backend/commands/functioncmds.c')
-rw-r--r--src/backend/commands/functioncmds.c7
1 files changed, 4 insertions, 3 deletions
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,