1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

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.
This commit is contained in:
Joe Conway
2006-08-02 01:59:48 +00:00
parent d307c428cb
commit 9caafda579
40 changed files with 1877 additions and 313 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.279 2006/07/27 19:52:05 tgl Exp $
* $PostgreSQL: pgsql/src/backend/nodes/outfuncs.c,v 1.280 2006/08/02 01:59:45 joe Exp $
*
* NOTES
* Every node type that can appear in stored rules' parsetrees *must*
@@ -410,6 +410,14 @@ _outFunctionScan(StringInfo str, FunctionScan *node)
_outScanInfo(str, (Scan *) node);
}
static void
_outValuesScan(StringInfo str, ValuesScan *node)
{
WRITE_NODE_TYPE("VALUESSCAN");
_outScanInfo(str, (Scan *) node);
}
static void
_outJoin(StringInfo str, Join *node)
{
@@ -1381,6 +1389,7 @@ _outSelectStmt(StringInfo str, SelectStmt *node)
WRITE_NODE_FIELD(whereClause);
WRITE_NODE_FIELD(groupClause);
WRITE_NODE_FIELD(havingClause);
WRITE_NODE_FIELD(valuesLists);
WRITE_NODE_FIELD(sortClause);
WRITE_NODE_FIELD(limitOffset);
WRITE_NODE_FIELD(limitCount);
@@ -1591,6 +1600,9 @@ _outRangeTblEntry(StringInfo str, RangeTblEntry *node)
WRITE_NODE_FIELD(funccoltypes);
WRITE_NODE_FIELD(funccoltypmods);
break;
case RTE_VALUES:
WRITE_NODE_FIELD(values_lists);
break;
case RTE_JOIN:
WRITE_ENUM_FIELD(jointype, JoinType);
WRITE_NODE_FIELD(joinaliasvars);
@@ -1876,6 +1888,9 @@ _outNode(StringInfo str, void *obj)
case T_FunctionScan:
_outFunctionScan(str, obj);
break;
case T_ValuesScan:
_outValuesScan(str, obj);
break;
case T_Join:
_outJoin(str, obj);
break;