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);