Skip Menu |
 

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 40604
Status: resolved
Priority: 0/
Queue: DBD-Pg

People
Owner: greg [...] turnstep.com
Requestors: lamprecht [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 2.11.4



Download (untitled) / with headers
text/plain 568b
Hi, trying to build DBD::Pg I got failing tests because of a non standard LC_MESSAGES locale: t/02attribs.........209/249 # Failed test 'Database handle attribute "ReadOnly" prevents INSERT queries from working when on' # at t/02attribs.t line 1483. # 'DBD::Pg::db do failed: FEHLER: Transaktion ist Read-Only at t/02attribs.t line 1482. # ' # doesn't match '(?-xism:transaction is read-only)' This could be easily solved by setting LC_MESSAGES to 'C' explicitly. Patch against dbdpg_test_setup.pl attached Regards, Christoph Lamprecht
Subject: dbdpg_test_setup.diff
--- dbdpg_test_setup_ori.pl 2008-11-02 21:01:31.000000000 +0100 +++ dbdpg_test_setup.pl 2008-11-02 21:00:04.000000000 +0100 @@ -536,6 +536,7 @@ $dbh->{Warn} = 0; $dbh->do($SQL); $dbh->{Warn} = 1; + $dbh->do(q/SET LC_MESSAGES = 'C'/); $dbh->do(q{COMMENT ON COLUMN dbd_pg_test.id IS 'Bob is your uncle'}); } ## end setup
Download (untitled) / with headers
text/plain 239b
Show quoted text
> This could be easily solved by setting LC_MESSAGES to 'C' explicitly.
Thanks, great idea. I put this in dbdpg_test_setup.pl as there are a couple other tests caught by the same problem. Committed to subversion and now a part of 2.11.3.
From: david [...] dawninglight.net
Download (untitled) / with headers
text/plain 390b
On Mon Nov 03 08:52:50 2008, greg@turnstep.com wrote: Show quoted text
> > This could be easily solved by setting LC_MESSAGES to 'C' explicitly.
> > Thanks, great idea. I put this in dbdpg_test_setup.pl as there are a > couple other tests caught by the same problem. Committed to subversion > and now a part of 2.11.3.
Unfortunately, this breaks if the tests are not run as a db superuser. David Blewett
Show quoted text
> Unfortunately, this breaks if the tests are not run as a db superuser.
Thanks, will fix.
Subject: Re: [rt.cpan.org #40604] LC_MESSAGES setting in tests
Date: Wed, 12 Nov 2008 20:44:08 +0100
To: bug-DBD-Pg [...] rt.cpan.org
From: Ch Lamprecht <ch.l.ngre [...] online.de>
Download (untitled) / with headers
text/plain 276b
Greg Sabino Mullane via RT schrieb: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=40604 > >
>> Unfortunately, this breaks if the tests are not run as a db superuser.
> > Thanks, will fix.
Maybe it would be better to check for errorcodes instead of messages? Christoph
Download (untitled) / with headers
text/plain 228b
Show quoted text
> Maybe it would be better to check for errorcodes instead of messages?
In most cases, the codes are far too generic to be of any use much beyond "error or no error", but I'll check if any can be used for the current checks.
Download (untitled) / with headers
text/plain 160b
I stand corrected, we can use the sqlstate codes for all the language-specific tests in question. Thanks! Will be part of version 2.11.4, to be released today.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.