mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-17 03:47:01 +08:00
Band-aid fix for incorrect use of view options as StdRdOptions.
We really ought to make StdRdOptions and the other decoded forms of reloptions self-identifying, but for the moment, assume that only plain relations could possibly be user_catalog_tables. Fixes problem with bogus "ON CONFLICT is not supported on table ... used as a catalog table" error when target is a view with cascade option. Discussion: <26681.1477940227@sss.pgh.pa.us>
This commit is contained in:
@ -253,7 +253,8 @@ typedef struct StdRdOptions
|
||||
* from the pov of logical decoding. Note multiple eval or argument!
|
||||
*/
|
||||
#define RelationIsUsedAsCatalogTable(relation) \
|
||||
((relation)->rd_options ? \
|
||||
((relation)->rd_rel->relkind == RELKIND_RELATION && \
|
||||
(relation)->rd_options ? \
|
||||
((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user