mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
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
This commit is contained in:
@ -8806,7 +8806,8 @@ ATExecSetRelOptions(Relation rel, List *defList, AlterTableType operation,
|
||||
if (check_option)
|
||||
{
|
||||
const char *view_updatable_error =
|
||||
view_query_is_auto_updatable(view_query, security_barrier);
|
||||
view_query_is_auto_updatable(view_query,
|
||||
security_barrier, true);
|
||||
|
||||
if (view_updatable_error)
|
||||
ereport(ERROR,
|
||||
|
Reference in New Issue
Block a user