Improve error message when repack against non-existing table.

Previously, pg_repack shows "ERROR: ERROR: relation foo does not
exist" when specify non-existing table. Though the first ERROR
is from pg_repack and the second ERROR is from PostgreSQL server,
some users might think that pg_repack shows error level twice
wrongly.
This commit is contained in:
bwtakacy 2015-01-16 10:21:17 +09:00
parent 3920a5e5cd
commit 49e542a0b6

View File

@ -341,7 +341,7 @@ main(int argc, char *argv[])
{
if (!repack_one_database(orderby, errbuf, sizeof(errbuf)))
ereport(ERROR,
(errcode(ERROR), errmsg("%s", errbuf)));
(errcode(ERROR), errmsg("pg_repack fails by PostgreSQL server error: %s", errbuf)));
}
}