mirror of
https://github.com/postgres/postgres.git
synced 2025-07-15 19:21:59 +03:00
Fix things so that updatable views work with partitioned tables.
Previously, ExecInitModifyTable was missing handling for WITH CHECK OPTION, and view_query_is_auto_updatable was missing handling for RELKIND_PARTITIONED_TABLE. Amit Langote, reviewed by me.
This commit is contained in:
@ -2249,7 +2249,8 @@ view_query_is_auto_updatable(Query *viewquery, bool check_cols)
|
||||
if (base_rte->rtekind != RTE_RELATION ||
|
||||
(base_rte->relkind != RELKIND_RELATION &&
|
||||
base_rte->relkind != RELKIND_FOREIGN_TABLE &&
|
||||
base_rte->relkind != RELKIND_VIEW))
|
||||
base_rte->relkind != RELKIND_VIEW &&
|
||||
base_rte->relkind != RELKIND_PARTITIONED_TABLE))
|
||||
return gettext_noop("Views that do not select from a single table or view are not automatically updatable.");
|
||||
|
||||
if (base_rte->tablesample)
|
||||
|
Reference in New Issue
Block a user