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

[email protected]
Newsgroups perl.dbd.pg.changes
Message-ID <[email protected]>
Author: turnstep
Date: Wed Nov 12 08:41:27 2008
New Revision: 12068

Modified:
   DBD-Pg/trunk/t/dbdpg_test_setup.pl

Log:
Don't set lc_messages unless a superuser


Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl	(original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl	Wed Nov 12 08:41:27 2008
@@ -498,7 +498,11 @@
 		return $helpconnect, '', $dbh;
 	}
 
-	$dbh->do(q{SET LC_MESSAGES = 'C'});
+	my $SQL = 'SELECT usesuper FROM pg_user WHERE usename = current_user';
+	my $bga = $dbh->selectall_arrayref($SQL)->[0][0];
+	if ($bga) {
+		$dbh->do(q{SET LC_MESSAGES = 'C'});
+	}
 
 	if ($arg->{nosetup}) {
 		return $helpconnect, '', $dbh unless schema_exists($dbh, $S);
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.