[svn:DBD-Pg] r11818 - DBD-Pg/trunk

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Thu Sep 18 12:10:13 2008
New Revision: 11818

Modified:
   DBD-Pg/trunk/dbdimp.c

Log:
Don't coredump if standard_conforming_string is not available!


Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c	(original)
+++ DBD-Pg/trunk/dbdimp.c	Thu Sep 18 12:10:13 2008
@@ -623,7 +623,7 @@
 	SV *   retsv = Nullsv;
 	
 	if (TSTART) TRC(DBILOGFP, "%sBegin dbd_db_FETCH (key: %s)\n", THEADER, dbh ? key : key);
-	
+
 	switch (kl) {
 
 	case 5: /* pg_db */
@@ -743,8 +743,9 @@
 	case 30: /* pg_standard_conforming_strings */
 
 		if (strEQ("pg_standard_conforming_strings", key)) {
-			TRACE_PQPARAMETERSTATUS;
-			retsv = newSVpv(PQparameterStatus(imp_dbh->conn,"standard_conforming_strings"),0);
+			if (NULL != PQparameterStatus(imp_dbh->conn, "standard_conforming_strings")) {
+				retsv = newSVpv(PQparameterStatus(imp_dbh->conn,"standard_conforming_strings"),0);
+			}
 		}
 		break;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.