mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user