Show distribution information for partitioned tables too.
authorPavan Deolasee <[email protected]>
Thu, 15 Jun 2017 12:27:54 +0000 (17:57 +0530)
committerPavan Deolasee <[email protected]>
Thu, 15 Jun 2017 12:27:54 +0000 (17:57 +0530)
While using \d and associated commands in psql, we now check for partitioned
tables and fetch their distribution information too, just as regular tables.

src/bin/psql/describe.c

index 69fc7e6ba06711c14d10bb80acd5f201bf38e5a9..6ada5ea4f4a7bb1b4871536b064d0de02d15f982 100644 (file)
@@ -2945,7 +2945,7 @@ describeOneTableDetails(const char *schemaname,
                                                          true);
 #ifdef PGXC
                /* print distribution information */
-               if (verbose && tableinfo.relkind == 'r')
+               if (verbose && (tableinfo.relkind == 'r' || tableinfo.relkind == 'p'))
                {
                        printfPQExpBuffer(&buf,
                                                "SELECT CASE pclocatortype \n"