git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 42f50cb)
pg_dump: Strict names with no matching schema
2017年1月10日 16:34:51 +0000 (11:34 -0500)
2017年1月10日 16:34:51 +0000 (11:34 -0500)
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.


diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 148e8e132db02ca7e666512018cb1d6b9cdb07cb..1f3f019506cafa8dc05bdad91a5260a26b49dda1 100644 (file)
--- 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++)
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /