src/server/plugins/postgresql/pgtest.c

changeset 664
9b1066313c17
parent 660
f00d03835dd9
--- a/src/server/plugins/postgresql/pgtest.c	Fri Feb 06 14:16:09 2026 +0100
+++ b/src/server/plugins/postgresql/pgtest.c	Fri Feb 06 15:57:37 2026 +0100
@@ -50,7 +50,7 @@
 #define MAP_GET(map, key) cxMapGet(map, cx_hash_key_str(key))
 #define MAP_PUT(map, key, value) cxMapPut(map, cx_hash_key_str(key), value)
 
-static char *pg_connstr = "postgresql://localhost/test1";
+static char *pg_connstr = "dbname=test1";
 static int abort_pg_tests = 0;
 static PGconn *test_connection;
 static ResourceData resdata;
@@ -89,7 +89,8 @@
         abort_pg_tests = 1;
     }
     
-    if(PQstatus(test_connection) != CONNECTION_OK) {
+    ConnStatusType status = PQstatus(test_connection);
+    if(status != CONNECTION_OK) {
         abort_pg_tests = 1;
     }
     

mercurial