Skip to content

Commit 530f806

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 279c439 commit 530f806

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
@@ -270,8 +270,9 @@ typedef struct StdRdOptions
270270
* from the pov of logical decoding. Note multiple eval of argument!
271271
*/
272272
#define RelationIsUsedAsCatalogTable(relation) \
273-
((relation)->rd_rel->relkind == RELKIND_RELATION && \
274-
(relation)->rd_options ? \
273+
((relation)->rd_options && \
274+
((relation)->rd_rel->relkind == RELKIND_RELATION || \
275+
(relation)->rd_rel->relkind == RELKIND_MATVIEW) ? \
275276
((StdRdOptions *) (relation)->rd_options)->user_catalog_table : false)
276277

277278
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy