diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 515bcb6779..d67212b831 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -8440,7 +8440,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); @@ -8610,7 +8610,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/doc/src/sgml/lobj.sgml b/doc/src/sgml/lobj.sgml index 771795ae66..f56aeebddb 100644 --- a/doc/src/sgml/lobj.sgml +++ b/doc/src/sgml/lobj.sgml @@ -936,7 +936,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/src/test/examples/testlibpq.c b/src/test/examples/testlibpq.c index 92a05e5309..d9c6c4587d 100644 --- a/src/test/examples/testlibpq.c +++ b/src/test/examples/testlibpq.c @@ -51,7 +51,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/src/test/examples/testlibpq2.c b/src/test/examples/testlibpq2.c index 76787fe010..62ecd68b55 100644 --- a/src/test/examples/testlibpq2.c +++ b/src/test/examples/testlibpq2.c @@ -80,7 +80,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/src/test/examples/testlibpq4.c b/src/test/examples/testlibpq4.c index a20f6249b4..6fcbdda2fa 100644 --- a/src/test/examples/testlibpq4.c +++ b/src/test/examples/testlibpq4.c @@ -37,7 +37,7 @@ check_prepare_conn(PGconn *conn, const char *dbName) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/src/test/examples/testlo.c b/src/test/examples/testlo.c index be5c72b9a6..8d8fb494f9 100644 --- a/src/test/examples/testlo.c +++ b/src/test/examples/testlo.c @@ -235,7 +235,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res); diff --git a/src/test/examples/testlo64.c b/src/test/examples/testlo64.c index 39ba009c52..85da06a640 100644 --- a/src/test/examples/testlo64.c +++ b/src/test/examples/testlo64.c @@ -259,7 +259,7 @@ main(int argc, char **argv) /* Set always-secure search path, so malicous users can't take control. */ res = PQexec(conn, "SELECT pg_catalog.set_config('search_path', '', false)"); - if (PQresultStatus(res) != PGRES_COMMAND_OK) + if (PQresultStatus(res) != PGRES_TUPLES_OK) { fprintf(stderr, "SET failed: %s", PQerrorMessage(conn)); PQclear(res);