From ebbb7c3a476642b3a42394e1aa54676ed438b8ee Mon Sep 17 00:00:00 2001 From: Dan Farina Date: Mon, 7 Feb 2011 02:26:02 -0800 Subject: [PATCH] Fix more quoting: used an overly-quoted copy Signed-off-by: Dan Farina --- repmgr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/repmgr.c b/repmgr.c index 45626bbe..1b519d1e 100644 --- a/repmgr.c +++ b/repmgr.c @@ -543,7 +543,7 @@ do_standby_register(void) /* Check if there is a schema for this cluster */ sqlquery_snprintf(sqlquery, "SELECT 1 FROM pg_namespace " - " WHERE nspname = 'repmgr_%s'", schema_str); + " WHERE nspname = '%s'", schema_str); res = PQexec(conn, sqlquery); if (PQresultStatus(res) != PGRES_TUPLES_OK) @@ -555,9 +555,10 @@ do_standby_register(void) return; } - if (PQntuples(res) == 0) /* schema doesn't exists */ + /* schema doesn't exist */ + if (PQntuples(res) == 0) { - fprintf(stderr, "Schema %s doesn't exists.", schema_quoted); + fprintf(stderr, "Schema %s doesn't exist.\n", schema_quoted); PQclear(res); PQfinish(conn); return;