Skip to content

Commit abfd009

Browse files
committed
pg_dump: Strict names with no matching schema
When using pg_dump --strict-names and a schema pattern which doesn't match any schemas (eg: --schema='nonexistant*'), we were incorrectly throwing an error claiming no tables were found when, really, there were no schemas found: -> pg_dump --strict-names --schema='nonexistant*' pg_dump: no matching tables were found for pattern "nonexistant*" Fix that by changing the error message to say 'schemas' instead, since that is what we are actually complaining about. Noticed while testing pg_dump error cases. Back-patch to 9.6 where --strict-names and this error message were introduced.
1 parent 42f50cb commit abfd009

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ expand_schema_name_patterns(Archive *fout,
12161216

12171217
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
12181218
if (strict_names && PQntuples(res) == 0)
1219-
exit_horribly(NULL, "no matching tables were found for pattern \"%s\"\n", cell->val);
1219+
exit_horribly(NULL, "no matching schemas were found for pattern \"%s\"\n", cell->val);
12201220

12211221
for (i = 0; i < PQntuples(res); i++)
12221222
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy