aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-11-10 15:00:58 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2016-11-10 15:00:58 -0500
commit6e00ba1e17056b86f698e448f900bc35868f5f64 (patch)
tree1c98993c5abf0c9928e5650359555fc73f5e03c7 /src
parentaf017fc195fbf7e861cef470d5169320c45f5582 (diff)
downloadpostgresql-6e00ba1e17056b86f698e448f900bc35868f5f64.tar.gz
postgresql-6e00ba1e17056b86f698e448f900bc35868f5f64.zip
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 e3e66d8a9 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>
Diffstat (limited to 'src')
-rw-r--r--src/include/utils/rel.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h
index 755badff0c9..ebc00b0d4d4 100644
--- a/src/include/utils/rel.h
+++ b/src/include/utils/rel.h
@@ -253,8 +253,9 @@ typedef struct StdRdOptions
* from the pov of logical decoding. Note multiple eval or argument!
*/
#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)