diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-11-07 12:08:19 -0500 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-11-07 12:08:19 -0500 |
| commit | e2f5cd9cf5588cc37f665fb2ca061898b5c73f2a (patch) | |
| tree | 403774282daa86cdcf81c869210d99df222b9675 /src/include/utils | |
| parent | e98c3ab2bd65f0e78bce20ace477eeed76b87345 (diff) | |
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>
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/rel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h index 8a55a090b61..755badff0c9 100644 --- a/src/include/utils/rel.h +++ b/src/include/utils/rel.h @@ -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) |
