diff options
author | Robert Haas <rhaas@postgresql.org> | 2013-10-18 10:35:36 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2013-10-18 10:35:36 -0400 |
commit | cab5dc5daf2f6f5da0ce79deb399633b4bb443b5 (patch) | |
tree | 03a7cd95ec18a79cbd4d44862df1c9a914da728b /src/backend/commands/view.c | |
parent | 523beaa11bdf6a9864e8978b467ed586b792c9ca (diff) | |
download | postgresql-cab5dc5daf2f6f5da0ce79deb399633b4bb443b5.tar.gz postgresql-cab5dc5daf2f6f5da0ce79deb399633b4bb443b5.zip |
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
Diffstat (limited to 'src/backend/commands/view.c')
-rw-r--r-- | src/backend/commands/view.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 832de439789..aca40e7a763 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -469,7 +469,7 @@ DefineView(ViewStmt *stmt, const char *queryString) if (check_option) { const char *view_updatable_error = - view_query_is_auto_updatable(viewParse, security_barrier); + view_query_is_auto_updatable(viewParse, security_barrier, true); if (view_updatable_error) ereport(ERROR, |