]> granicus.if.org Git - postgresql/commit
Allow only some columns of a view to be auto-updateable.
authorRobert Haas <rhaas@postgresql.org>
Fri, 18 Oct 2013 14:35:36 +0000 (10:35 -0400)
committerRobert Haas <rhaas@postgresql.org>
Fri, 18 Oct 2013 14:35:36 +0000 (10:35 -0400)
commitcab5dc5daf2f6f5da0ce79deb399633b4bb443b5
tree03a7cd95ec18a79cbd4d44862df1c9a914da728b
parent523beaa11bdf6a9864e8978b467ed586b792c9ca
Allow only some columns of a view to be auto-updateable.

Previously, unless all columns were auto-updateable, we wouldn't
inserts, updates, or deletes, or at least not without a rule or trigger;
now, we'll allow inserts and updates that target only the auto-updateable
columns, and deletes even if there are no auto-updateable columns at
all provided the view definition is otherwise suitable.

Dean Rasheed, reviewed by Marko Tiikkaja
doc/src/sgml/ref/create_view.sgml
src/backend/commands/tablecmds.c
src/backend/commands/view.c
src/backend/rewrite/rewriteHandler.c
src/backend/utils/adt/misc.c
src/include/rewrite/rewriteHandler.h
src/test/regress/expected/updatable_views.out
src/test/regress/sql/updatable_views.sql