pgsql: Allow WITH clauses to be attached to INSERT, UPDATE, DELETE stat
От | Tom Lane |
---|---|
Тема | pgsql: Allow WITH clauses to be attached to INSERT, UPDATE, DELETE stat |
Дата | |
Msg-id | E1P6u8E-0004wH-Da@gemulon.postgresql.org обсуждение исходный текст |
Список | 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(-)
В списке pgsql-committers по дате отправления: