aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/functioncmds.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2002-09-15 13:04:16 +0000
committerPeter Eisentraut <peter_e@gmx.net>2002-09-15 13:04:16 +0000
commit5ea9322872c65c5353a305ca5f1c4acfcb486569 (patch)
tree050cf76c6d96989f556585db699ca062b0adef1f /src/backend/commands/functioncmds.c
parentdb4f3c033448ee56bda2244f9ce868297887b73a (diff)
downloadpostgresql-5ea9322872c65c5353a305ca5f1c4acfcb486569.tar.gz
postgresql-5ea9322872c65c5353a305ca5f1c4acfcb486569.zip
Cast functions can be immutable or stable.
Diffstat (limited to 'src/backend/commands/functioncmds.c')
-rw-r--r--src/backend/commands/functioncmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c
index 47ebe0d7612..a935dae7e6e 100644
--- a/src/backend/commands/functioncmds.c
+++ b/src/backend/commands/functioncmds.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.19 2002/09/04 20:31:15 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.20 2002/09/15 13:04:16 petere Exp $
*
* DESCRIPTION
* These routines take the parse tree and pick out the
@@ -676,8 +676,8 @@ CreateCast(CreateCastStmt *stmt)
elog(ERROR, "argument of cast function must match source data type");
if (procstruct->prorettype != targettypeid)
elog(ERROR, "return data type of cast function must match target data type");
- if (procstruct->provolatile != PROVOLATILE_IMMUTABLE)
- elog(ERROR, "cast function must be immutable");
+ if (procstruct->provolatile == PROVOLATILE_VOLATILE)
+ elog(ERROR, "cast function must not be volatile");
if (procstruct->proisagg)
elog(ERROR, "cast function must not be an aggregate function");
if (procstruct->proretset)