summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2017-01-10 11:34:51 -0500
committerStephen Frost <sfrost@snowman.net>2017-01-10 11:34:51 -0500
commitabfd0095c1e1a2e3fad2696516b64871895334ec (patch)
treeb2a16d0575afc2f19ad3dd85d20e71d22ff78987
parent42f50cb8fa9848bbbc6776bcea03293a6b28b2d4 (diff)
downloadpostgresql-abfd0095c1e1a2e3fad2696516b64871895334ec.tar.gz
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.
-rw-r--r--src/bin/pg_dump/pg_dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 148e8e132d..1f3f019506 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1216,7 +1216,7 @@ expand_schema_name_patterns(Archive *fout,
res = ExecuteSqlQuery(fout, query->data, PGRES_TUPLES_OK);
if (strict_names && PQntuples(res) == 0)
- exit_horribly(NULL, "no matching tables were found for pattern \"%s\"\n", cell->val);
+ exit_horribly(NULL, "no matching schemas were found for pattern \"%s\"\n", cell->val);
for (i = 0; i < PQntuples(res); i++)
{