Always use catalog path when calling system functions

Removes any risk of issues due to search path mangling etc.
This commit is contained in:
Ian Barwick
2015-11-11 11:17:47 +09:00
parent 53ed8e948c
commit ea01d1d30b
2 changed files with 8 additions and 8 deletions

View File

@@ -1014,7 +1014,7 @@ standby_monitor(void)
/* Get master xlog info */
sqlquery_snprintf(sqlquery, "SELECT pg_current_xlog_location()");
sqlquery_snprintf(sqlquery, "SELECT pg_catalog.pg_current_xlog_location()");
res = PQexec(master_conn, sqlquery);
if (PQresultStatus(res) != PGRES_TUPLES_OK)
@@ -1234,7 +1234,7 @@ do_master_failover(void)
terminate(ERR_FAILOVER_FAIL);
}
sqlquery_snprintf(sqlquery, "SELECT pg_last_xlog_receive_location()");
sqlquery_snprintf(sqlquery, "SELECT pg_catalog.pg_last_xlog_receive_location()");
res = PQexec(node_conn, sqlquery);
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{
@@ -1266,7 +1266,7 @@ do_master_failover(void)
}
/* last we get info about this node, and update shared memory */
sprintf(sqlquery, "SELECT pg_last_xlog_receive_location()");
sprintf(sqlquery, "SELECT pg_catalog.pg_last_xlog_receive_location()");
res = PQexec(my_local_conn, sqlquery);
if (PQresultStatus(res) != PGRES_TUPLES_OK)
{