From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Allow WITH clauses to be attached to INSERT, UPDATE, DELETE stat |
Date: | 2010-10-15 23:56:14 |
Message-ID: | E1P6u8E-0004wH-Da@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Allow WITH clauses to be attached to INSERT, UPDATE, DELETE statements.
This is not the hoped-for facility of using INSERT/UPDATE/DELETE inside
a WITH, but rather the other way around. It seems useful in its own
right anyway.
Note: catversion bumped because, although the contents of stored rules
might look compatible, there's actually a subtle semantic change.
A single Query containing a WITH and INSERT...VALUES now represents
writing the WITH before the INSERT, not before the VALUES. While it's
not clear that that matters to anyone, it seems like a good idea to
have it cited in the git history for catversion.h.
Original patch by Marko Tiikkaja, with updating and cleanup by
Hitoshi Harada.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=07f1264dda0e776a7e329b091c127059bce8cc54
Modified Files
--------------
doc/src/sgml/queries.sgml | 16 +++-
doc/src/sgml/ref/delete.sgml | 16 ++++-
doc/src/sgml/ref/insert.sgml | 25 +++++++-
doc/src/sgml/ref/update.sgml | 16 ++++-
src/backend/nodes/copyfuncs.c | 3 +
src/backend/nodes/equalfuncs.c | 3 +
src/backend/parser/analyze.c | 40 +++++++----
src/backend/parser/gram.y | 40 +++++++----
src/backend/parser/parse_utilcmd.c | 29 ++++++++
src/backend/utils/adt/ruleutils.c | 13 +++-
src/include/catalog/catversion.h | 2 +-
src/include/nodes/parsenodes.h | 3 +
src/test/regress/expected/with.out | 133 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/with.sql | 38 ++++++++++
14 files changed, 333 insertions(+), 44 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-10-16 04:28:15 | pgsql: Document that translate() removes characters in "from" that don' |
Previous Message | Peter Eisentraut | 2010-10-15 19:57:47 | pgsql: Support host names in pg_hba.conf |