summaryrefslogtreecommitdiff
path: root/src/backend/nodes/print.c
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2006-08-02 01:59:48 +0000
committerJoe Conway <mail@joeconway.com>2006-08-02 01:59:48 +0000
commit9caafda579f699b43fa4c89bf13a2331ef00611e (patch)
tree330423c4be56ffaacb2d028153706f0c213c0aec /src/backend/nodes/print.c
parentd307c428cbb7c426e40163d234d993e644bbcc6b (diff)
downloadpostgresql-9caafda579f699b43fa4c89bf13a2331ef00611e.tar.gz
Add support for multi-row VALUES clauses as part of INSERT statements
(e.g. "INSERT ... VALUES (...), (...), ...") and elsewhere as allowed by the spec. (e.g. similar to a FROM clause subselect). initdb required. Joe Conway and Tom Lane.
Diffstat (limited to 'src/backend/nodes/print.c')
-rw-r--r--src/backend/nodes/print.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c
index 1a83be6574..7fff94a8a3 100644
--- a/src/backend/nodes/print.c
+++ b/src/backend/nodes/print.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.80 2006/07/14 14:52:20 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/print.c,v 1.81 2006/08/02 01:59:45 joe Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -275,6 +275,10 @@ print_rt(List *rtable)
printf("%d\t%s\t[rangefunction]",
i, rte->eref->aliasname);
break;
+ case RTE_VALUES:
+ printf("%d\t%s\t[values list]",
+ i, rte->eref->aliasname);
+ break;
case RTE_JOIN:
printf("%d\t%s\t[join]",
i, rte->eref->aliasname);
@@ -507,6 +511,8 @@ plannode_type(Plan *p)
return "SUBQUERYSCAN";
case T_FunctionScan:
return "FUNCTIONSCAN";
+ case T_ValuesScan:
+ return "VALUESSCAN";
case T_Join:
return "JOIN";
case T_NestLoop:
@@ -575,6 +581,13 @@ print_plan_recursive(Plan *p, Query *parsetree, int indentLevel, char *label)
rte = rt_fetch(((FunctionScan *) p)->scan.scanrelid, parsetree->rtable);
StrNCpy(extraInfo, rte->eref->aliasname, NAMEDATALEN);
}
+ else if (IsA(p, ValuesScan))
+ {
+ RangeTblEntry *rte;
+
+ rte = rt_fetch(((ValuesScan *) p)->scan.scanrelid, parsetree->rtable);
+ StrNCpy(extraInfo, rte->eref->aliasname, NAMEDATALEN);
+ }
else
extraInfo[0] = '\0';
if (extraInfo[0] != '\0')