aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-04-29 22:13:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-04-29 22:13:11 +0000
commitaa282d44464df0fbfa0672dc353d36734ec1092e (patch)
treedbf42be31346c6716bc33e73e801cda670fc60e4 /src/backend/commands
parent19141f558411e96446294baf240eaeccf6d68b64 (diff)
downloadpostgresql-aa282d44464df0fbfa0672dc353d36734ec1092e.tar.gz
postgresql-aa282d44464df0fbfa0672dc353d36734ec1092e.zip
Infrastructure for deducing Param types from context, in the same way
that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so.
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/schemacmds.c4
-rw-r--r--src/backend/commands/tablecmds.c4
-rw-r--r--src/backend/commands/typecmds.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index ba37c249873..4e2224e189b 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.7 2002/12/05 04:04:42 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/schemacmds.c,v 1.8 2003/04/29 22:13:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -124,7 +124,7 @@ CreateSchemaCommand(CreateSchemaStmt *stmt)
List *querytree_list,
*querytree_item;
- querytree_list = parse_analyze(parsetree, NULL);
+ querytree_list = parse_analyze(parsetree, NULL, 0);
foreach(querytree_item, querytree_list)
{
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index b4576893c66..5f60ab9cf01 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.71 2003/04/21 15:19:55 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.72 2003/04/29 22:13:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2852,7 +2852,7 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr)
/*
* Make sure it yields a boolean result.
*/
- expr = coerce_to_boolean(expr, "CHECK");
+ expr = coerce_to_boolean(pstate, expr, "CHECK");
/*
* Make sure no outside relations are referred to.
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index 3cc11ed81a5..0523878f2a7 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.33 2003/04/08 16:57:45 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.34 2003/04/29 22:13:08 tgl Exp $
*
* DESCRIPTION
* The "DefineFoo" routines take the parse tree and pick out the
@@ -1601,7 +1601,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid,
/*
* Make sure it yields a boolean result.
*/
- expr = coerce_to_boolean(expr, "CHECK");
+ expr = coerce_to_boolean(pstate, expr, "CHECK");
/*
* Make sure no outside relations are