diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 7a06af48842..83f69a11a06 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1520,20 +1520,6 @@ describeTableDetails(const char *pattern, bool verbose, bool showSystem) if (!res) return false; - if (PQntuples(res) == 0) - { - if (!pset.quiet) - { - if (pattern) - pg_log_error("Did not find any relation named \"%s\".", - pattern); - else - pg_log_error("Did not find any relations."); - } - PQclear(res); - return false; - } - for (i = 0; i < PQntuples(res); i++) { const char *oid; @@ -1720,14 +1706,6 @@ describeOneTableDetails(const char *schemaname, if (!res) goto error_return; - /* Did we get anything? */ - if (PQntuples(res) == 0) - { - if (!pset.quiet) - pg_log_error("Did not find any relation with OID %s.", oid); - goto error_return; - } - tableinfo.checks = atoi(PQgetvalue(res, 0, 0)); tableinfo.relkind = *(PQgetvalue(res, 0, 1)); tableinfo.hasindex = strcmp(PQgetvalue(res, 0, 2), "t") == 0; @@ -3763,6 +3741,7 @@ describeRoles(const char *pattern, bool verbose, bool showSystem) return false; nrows = PQntuples(res); + attr = pg_malloc0((nrows + 1) * sizeof(*attr)); printTableInit(&cont, &myopt, _("List of roles"), ncols, nrows); @@ -5404,20 +5383,6 @@ listTSParsersVerbose(const char *pattern) if (!res) return false; - if (PQntuples(res) == 0) - { - if (!pset.quiet) - { - if (pattern) - pg_log_error("Did not find any text search parser named \"%s\".", - pattern); - else - pg_log_error("Did not find any text search parsers."); - } - PQclear(res); - return false; - } - for (i = 0; i < PQntuples(res); i++) { const char *oid; @@ -5782,20 +5747,6 @@ listTSConfigsVerbose(const char *pattern) if (!res) return false; - if (PQntuples(res) == 0) - { - if (!pset.quiet) - { - if (pattern) - pg_log_error("Did not find any text search configuration named \"%s\".", - pattern); - else - pg_log_error("Did not find any text search configurations."); - } - PQclear(res); - return false; - } - for (i = 0; i < PQntuples(res); i++) { const char *oid; @@ -6257,20 +6208,6 @@ listExtensionContents(const char *pattern) if (!res) return false; - if (PQntuples(res) == 0) - { - if (!pset.quiet) - { - if (pattern) - pg_log_error("Did not find any extension named \"%s\".", - pattern); - else - pg_log_error("Did not find any extensions."); - } - PQclear(res); - return false; - } - for (i = 0; i < PQntuples(res); i++) { const char *extname; @@ -6604,22 +6541,6 @@ describePublications(const char *pattern) return false; } - if (PQntuples(res) == 0) - { - if (!pset.quiet) - { - if (pattern) - pg_log_error("Did not find any publication named \"%s\".", - pattern); - else - pg_log_error("Did not find any publications."); - } - - termPQExpBuffer(&buf); - PQclear(res); - return false; - } - for (i = 0; i < PQntuples(res); i++) { const char align = 'l';