Commit 530f8065 authored by Tom Lane's avatar Tom Lane

Re-allow user_catalog_table option for materialized views.

The reloptions stuff allows this option to be set on a matview.
While it's questionable whether that is useful or was really intended,
it does work, and we shouldn't change that in minor releases.  Commit
e3e66d8a disabled the option since I didn't realize that it was
possible for it to be set on a matview.  Tweak the test to re-allow it.

Discussion: <19749.1478711862@sss.pgh.pa.us>
parent 279c439c
...@@ -270,8 +270,9 @@ typedef struct StdRdOptions ...@@ -270,8 +270,9 @@ typedef struct StdRdOptions
* from the pov of logical decoding. Note multiple eval of argument! * from the pov of logical decoding. Note multiple eval of argument!
*/ */
#define RelationIsUsedAsCatalogTable(relation) \ #define RelationIsUsedAsCatalogTable(relation) \
((relation)->rd_rel->relkind == RELKIND_RELATION && \ ((relation)->rd_options && \
(relation)->rd_options ? \ ((relation)->rd_rel->relkind == RELKIND_RELATION || \
(relation)->rd_rel->relkind == RELKIND_MATVIEW) ? \
((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false) ((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false)
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment