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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 74924d2) | patch
Apply a simple solution to the problem of making INSERT/UPDATE/DELETE
Sat, 2 Sep 2006 17:06:52 +0000 (17:06 +0000)
Sat, 2 Sep 2006 17:06:52 +0000 (17:06 +0000)
commit 917bbebf7ffd4466e1eeaba70b71fb60423e3ece
Apply a simple solution to the problem of making INSERT/UPDATE/DELETE
RETURNING play nice with views/rules. To wit, have the rule rewriter
rewrite any RETURNING clause found in a rule to produce what the rule's
triggering query asked for in its RETURNING clause, in particular drop
the RETURNING clause if no RETURNING in the triggering query. This
leaves the responsibility for knowing how to produce the view's output
columns on the rule author, without requiring any fundamental changes
in rule semantics such as adding new rule event types would do. The
initial implementation constrains things to ensure that there is
exactly one, unconditionally invoked RETURNING clause among the rules
for an event --- later we might be able to relax that, but for a post
feature freeze fix it seems better to minimize how much invention we do.
Per gripe from Jaime Casanova.
doc/src/sgml/ref/create_rule.sgml diff | blob | blame | history
doc/src/sgml/rules.sgml diff | blob | blame | history
src/backend/rewrite/rewriteDefine.c diff | blob | blame | history
src/backend/rewrite/rewriteHandler.c diff | blob | blame | history
src/test/regress/expected/returning.out diff | blob | blame | history
src/test/regress/sql/returning.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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