]> granicus.if.org Git - postgresql/commit
Allow WITH clauses to be attached to INSERT, UPDATE, DELETE statements.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Oct 2010 23:53:59 +0000 (19:53 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Oct 2010 23:55:25 +0000 (19:55 -0400)
commit07f1264dda0e776a7e329b091c127059bce8cc54
treec77493be3b7c010de069a431035b80db720b0969
parent6ab42ae36713b1e6f961c37e22f99d3e6267523b
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.
14 files changed:
doc/src/sgml/queries.sgml
doc/src/sgml/ref/delete.sgml
doc/src/sgml/ref/insert.sgml
doc/src/sgml/ref/update.sgml
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_utilcmd.c
src/backend/utils/adt/ruleutils.c
src/include/catalog/catversion.h
src/include/nodes/parsenodes.h
src/test/regress/expected/with.out
src/test/regress/sql/with.sql