This is an automated email from the ASF dual-hosted git repository.

reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit fb6b34a8e1e5a6f757908fb1b31356eb551370a6
Author: Peter Eisentraut <[email protected]>
AuthorDate: Thu Dec 2 16:46:28 2021 +0100

    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 <[email protected]>
    Discussion: 
https://www.postgresql.org/message-id/flat/[email protected]
    (cherry picked from commit a22d6a2cb62c4fc6d7c4b077d8014fd4ffaec426)
---
 src/bin/pg_dump/pg_dump.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index e9bee1cba5..2d77da17d2 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -3155,9 +3155,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 */


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to