git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 8b29a11) | patch
Support MERGE into updatable views.
2024年2月29日 15:56:59 +0000 (15:56 +0000)
2024年2月29日 15:56:59 +0000 (15:56 +0000)
commit 5f2e179bd31e5f5803005101eb12a8d7bf8db8f3
Support MERGE into updatable views.

This allows the target relation of MERGE to be an auto-updatable or
trigger-updatable view, and includes support for WITH CHECK OPTION,
security barrier views, and security invoker views.

A trigger-updatable view must have INSTEAD OF triggers for every type
of action (INSERT, UPDATE, and DELETE) mentioned in the MERGE command.
An auto-updatable view must not have any INSTEAD OF triggers. Mixing
auto-update and trigger-update actions (i.e., having a partial set of
INSTEAD OF triggers) is not supported.

Rule-updatable views are also not supported, since there is no
rewriter support for non-SELECT rules with MERGE operations.

Dean Rasheed, reviewed by Jian He and Alvaro Herrera.

Discussion: https://postgr.es/m/CAEZATCVcB1g0nmxuEc-A+gGB0HnfcGQNGYH7gS=7rq0u0zOBXA@mail.gmail.com
23 files changed:
doc/src/sgml/ref/create_view.sgml diff | blob | blame | history
doc/src/sgml/ref/merge.sgml diff | blob | blame | history
doc/src/sgml/rules.sgml diff | blob | blame | history
src/backend/commands/copyfrom.c diff | blob | blame | history
src/backend/executor/execMain.c diff | blob | blame | history
src/backend/executor/execPartition.c diff | blob | blame | history
src/backend/executor/nodeModifyTable.c diff | blob | blame | history
src/backend/optimizer/prep/prepjointree.c diff | blob | blame | history
src/backend/optimizer/util/appendinfo.c diff | blob | blame | history
src/backend/parser/parse_merge.c diff | blob | blame | history
src/backend/rewrite/rewriteHandler.c diff | blob | blame | history
src/backend/rewrite/rewriteManip.c diff | blob | blame | history
src/bin/psql/tab-complete.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/executor/executor.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/rewrite/rewriteHandler.h diff | blob | blame | history
src/test/regress/expected/merge.out diff | blob | blame | history
src/test/regress/expected/rules.out diff | blob | blame | history
src/test/regress/expected/updatable_views.out diff | blob | blame | history
src/test/regress/sql/merge.sql diff | blob | blame | history
src/test/regress/sql/rules.sql diff | blob | blame | history
src/test/regress/sql/updatable_views.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /