Skip to content

Commit eb8dc0e

Browse files
petererobozmey
authored andcommitted
pg_dump: Add missing relkind case
Checking for RELKIND_MATVIEW was forgotten in guessConstraintInheritance(). This isn't a live problem, since it is checked in flagInhTables() which relkinds can have parents, and those entries will have numParents==0 after that. But after discussion it was felt that this place should be kept consistent with flagInhTables() and flagInhAttrs(). Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://www.postgresql.org/message-id/flat/a574c8f1-9c84-93ad-a9e5-65233d6fc00f@enterprisedb.com (cherry picked from commit a22d6a2)
1 parent b725666 commit eb8dc0e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/bin/pg_dump/pg_dump.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3155,9 +3155,10 @@ guessConstraintInheritance(TableInfo *tblinfo, int numTables)
31553155
TableInfo **parents;
31563156
TableInfo *parent;
31573157

3158-
/* Sequences and views never have parents */
3158+
/* Some kinds never have parents */
31593159
if (tbinfo->relkind == RELKIND_SEQUENCE ||
3160-
tbinfo->relkind == RELKIND_VIEW)
3160+
tbinfo->relkind == RELKIND_VIEW ||
3161+
tbinfo->relkind == RELKIND_MATVIEW)
31613162
continue;
31623163

31633164
/* Don't bother computing anything for non-target tables, either */

0 commit comments

Comments
 (0)