[svn:DBD-Pg] r11413 - DBD-Pg/trunk/t

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Wed Jun 11 17:03:22 2008
New Revision: 11413

Modified:
   DBD-Pg/trunk/t/12placeholders.t

Log:
Don't assume backslash_quote is available.


Modified: DBD-Pg/trunk/t/12placeholders.t
==============================================================================
--- DBD-Pg/trunk/t/12placeholders.t	(original)
+++ DBD-Pg/trunk/t/12placeholders.t	Wed Jun 11 17:03:22 2008
@@ -131,8 +131,9 @@
 	$dbh->do(q{SET NAMES 'UTF8'});
 }
 
-my $SQL = 'SHOW backslash_quote';
-my $backslash = $dbh->selectall_arrayref($SQL)->[0][0];
+my $SQL = q{SELECT setting FROM pg_settings WHERE name = 'backslash_quote'};
+$count = $dbh->selectall_arrayref($SQL)->[0];
+my $backslash = defined $count ? $count->[0] : 0;
 
 $t=q{Prepare with backslashes inside quotes works};
 my $scs = $dbh->{pg_standard_conforming_strings};
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.