fix pgtest connection string

Fri, 06 Feb 2026 15:57:37 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Fri, 06 Feb 2026 15:57:37 +0100
changeset 664
9b1066313c17
parent 663
bd116bd44926
child 665
b8d5b797d090

fix pgtest connection string

src/server/plugins/postgresql/pgtest.c file | annotate | diff | comparison | revisions
--- 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