aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/typecmds.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-01-09 15:46:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-01-09 15:46:11 +0000
commitd04db370720ece56ffcad54e46cf03483c742ebb (patch)
treef446fa524bfef45b5152575dc188e49c43ea0a25 /src/backend/commands/typecmds.c
parentd3706cb6d217bc9c4676541f2df32171ef6555a2 (diff)
downloadpostgresql-d04db370720ece56ffcad54e46cf03483c742ebb.tar.gz
postgresql-d04db370720ece56ffcad54e46cf03483c742ebb.zip
Arrange for function default arguments to be processed properly in expressions
that are set up for execution with ExecPrepareExpr rather than going through the full planner process. By introducing an explicit notion of "expression planning", this patch also lays a bit of groundwork for maybe someday allowing sub-selects in standalone expressions.
Diffstat (limited to 'src/backend/commands/typecmds.c')
-rw-r--r--src/backend/commands/typecmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index f660a57da23..1bd0ef2cd13 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.129 2009/01/01 17:23:40 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.130 2009/01/09 15:46:10 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -50,7 +50,7 @@
#include "executor/executor.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
-#include "optimizer/planmain.h"
+#include "optimizer/planner.h"
#include "optimizer/var.h"
#include "parser/parse_coerce.h"
#include "parser/parse_expr.h"
@@ -2390,8 +2390,8 @@ GetDomainConstraints(Oid typeOid)
check_expr = (Expr *) stringToNode(TextDatumGetCString(val));
- /* ExecInitExpr assumes we already fixed opfuncids */
- fix_opfuncids((Node *) check_expr);
+ /* ExecInitExpr assumes we've planned the expression */
+ check_expr = expression_planner(check_expr);
r = makeNode(DomainConstraintState);
r->constrainttype = DOM_CONSTRAINT_CHECK;