diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2021-12-02 16:46:28 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2021-12-02 16:46:28 +0100 |
commit | a22d6a2cb62c4fc6d7c4b077d8014fd4ffaec426 (patch) | |
tree | 990875b90f89b67e7a7ec9c94d3ac24e10231734 /src | |
parent | f2c52eeba919a1b191f60445001371bd7c53aaa9 (diff) | |
download | postgresql-a22d6a2cb62c4fc6d7c4b077d8014fd4ffaec426.tar.gz postgresql-a22d6a2cb62c4fc6d7c4b077d8014fd4ffaec426.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 5a2094de9f8..01ffa5bf3a8 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -2762,9 +2762,10 @@ guessConstraintInheritance(TableInfo *tblinfo, int numTables) TableInfo **parents; TableInfo *parent; - /* Sequences and views never have parents */ + /* Some kinds never have parents */ if (tbinfo->relkind == RELKIND_SEQUENCE || - tbinfo->relkind == RELKIND_VIEW) + tbinfo->relkind == RELKIND_VIEW || + tbinfo->relkind == RELKIND_MATVIEW) continue; /* Don't bother computing anything for non-target tables, either */ |