Skip to content

Commit 6e00ba1

Browse files
committed
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 e3e66d8 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>
1 parent af017fc commit 6e00ba1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/include/utils/rel.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,9 @@ typedef struct StdRdOptions
253253
* from the pov of logical decoding. Note multiple eval or argument!
254254
*/
255255
#define RelationIsUsedAsCatalogTable(relation) \
256-
((relation)->rd_rel->relkind == RELKIND_RELATION && \
257-
(relation)->rd_options ? \
256+
((relation)->rd_options && \
257+
((relation)->rd_rel->relkind == RELKIND_RELATION || \
258+
(relation)->rd_rel->relkind == RELKIND_MATVIEW) ? \
258259
((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false)
259260

260261

0 commit comments

Comments
 (0)