diff options
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r-- | src/bin/psql/describe.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 1ab80eb7cac..6433497bcd2 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -2804,7 +2804,8 @@ describeOneTableDetails(const char *schemaname, PQgetvalue(result, i, 1)); /* Show the stats target if it's not default */ - if (strcmp(PQgetvalue(result, i, 8), "-1") != 0) + if (!PQgetisnull(result, i, 8) && + strcmp(PQgetvalue(result, i, 8), "-1") != 0) appendPQExpBuffer(&buf, "; STATISTICS %s", PQgetvalue(result, i, 8)); |