From 49e542a0b696cc0c4526ca137254e8c709e5c56a Mon Sep 17 00:00:00 2001 From: bwtakacy Date: Fri, 16 Jan 2015 10:21:17 +0900 Subject: [PATCH] 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. --- bin/pg_repack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pg_repack.c b/bin/pg_repack.c index 4095037..8b1864f 100644 --- a/bin/pg_repack.c +++ b/bin/pg_repack.c @@ -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))); } }