1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +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

@ -7,7 +7,7 @@
* Portions Copyright (c) 1994-5, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.149 2006/07/14 14:52:18 momjian Exp $
* $PostgreSQL: pgsql/src/backend/commands/explain.c,v 1.150 2006/08/02 01:59:45 joe Exp $
*
*-------------------------------------------------------------------------
*/
@ -527,6 +527,9 @@ explain_outNode(StringInfo str,
case T_FunctionScan:
pname = "Function Scan";
break;
case T_ValuesScan:
pname = "Values Scan";
break;
case T_Material:
pname = "Materialize";
break;
@ -666,6 +669,22 @@ explain_outNode(StringInfo str,
quote_identifier(rte->eref->aliasname));
}
break;
case T_ValuesScan:
if (((Scan *) plan)->scanrelid > 0)
{
RangeTblEntry *rte = rt_fetch(((Scan *) plan)->scanrelid,
es->rtable);
char *valsname;
/* Assert it's on a values rte */
Assert(rte->rtekind == RTE_VALUES);
valsname = rte->eref->aliasname;
appendStringInfo(str, " on %s",
quote_identifier(valsname));
}
break;
default:
break;
}
@ -728,6 +747,7 @@ explain_outNode(StringInfo str,
case T_SeqScan:
case T_SubqueryScan:
case T_FunctionScan:
case T_ValuesScan:
show_scan_qual(plan->qual,
"Filter",
((Scan *) plan)->scanrelid,