Skip Menu |
 

This queue is for tickets about the DBIx-SearchBuilder CPAN distribution.

Report information
The Basics
Id: 18688
Status: resolved
Priority: 0/
Queue: DBIx-SearchBuilder

People
Owner: jesse+cpan [...] fsck.com
Requestors: akeep [...] robotman.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.40
Fixed in: 1.43



Subject: DBIx::SearchBuilder::Handle::Pg - No longer finds sequences for 7.3.x PostgreSQL
Download (untitled) / with headers
text/plain 1.2k
As of version 1.42 (not sure if this is the case for version before this, but it definitely works in 1.38) the DBIx::SearchBuilder::Handle::Pg->IdSequenceName can no longer find sequences in the 7.3.x (and possibly 7.4.x) versions of PostgreSQL. The culprit seems to be that the regex to determine if a column is a sequence (on line 240 (v 1.38) or 241 (v. 1.42)) changed from and (to): v. 1.38: m!^nextval\('"?([^"']+)"?'::(?:text|regclass)\)!i v. 1.42: m!^nextval\(\('"?([^"']+)"?'::(?:text|regclass)\).*\)!i I assume this was to support the change in PostgreSQL's response, which was: v. 7.3.11: id: nextval('principals_id_seq'::text) v. 8.1.1: id: nextval(('principals_id_seq'::text)::regclass) Unfortunately.. the new regex breaks support for the older version of PostgreSQL! I think (and have tested on Pg 7.3.11 and 8.1.1) that the following regex will work on both: m!^nextval\(?\('"?([^"']+)"?'::(?:text|regclass)\).*\)?!i but it is possible, this'll break for some other version, or be too permissive. Just for comparison: current: m!^nextval\(\('"?([^"']+)"?'::(?:text|regclass)\).*\)!i proposed: m!^nextval\(?\('"?([^"']+)"?'::(?:text|regclass)\).*\)?!i I just added the two ? so that it'll match both the (('yada'::text)::regclass) and the older ('yada'::text). Thanks!
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #18688] DBIx::SearchBuilder::Handle::Pg - No longer finds sequences for 7.3.x PostgreSQL
Date: Wed, 12 Apr 2006 16:50:17 -0400
To: Guest via RT <bug-DBIx-SearchBuilder [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 542b
On Wed, Apr 12, 2006 at 04:48:33PM -0400, Guest via RT wrote: Show quoted text
> > Wed Apr 12 16:48:32 2006: Request 18688 was acted upon. > Transaction: Ticket created by guest > Queue: DBIx-SearchBuilder > Subject: DBIx::SearchBuilder::Handle::Pg - No longer finds sequences for > 7.3.x PostgreSQL > Owner: Nobody > Requestors: akeep@robotman.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18688 >
Can you try out 1.43, already in pause' incoming directory? http://pause.perl.org/incoming/ -j
Subject: Re: [rt.cpan.org #18688] DBIx::SearchBuilder::Handle::Pg - No longer finds sequences for 7.3.x PostgreSQL
Date: Wed, 12 Apr 2006 17:27:10 -0400
To: bug-DBIx-SearchBuilder [...] rt.cpan.org
From: "Andy Keep" <andy.keep [...] gmail.com>
Download (untitled) / with headers
text/plain 900b
Works like a charm! (Ironically I'm installing RT and my 'make initialize-database' was failing). It works great now though. Thanks very much, and thanks for the swift response! -andy:) On 4/12/06, Jesse via RT <bug-DBIx-SearchBuilder@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=18688 > > > > > > On Wed, Apr 12, 2006 at 04:48:33PM -0400, Guest via RT wrote:
> > > > Wed Apr 12 16:48:32 2006: Request 18688 was acted upon. > > Transaction: Ticket created by guest > > Queue: DBIx-SearchBuilder > > Subject: DBIx::SearchBuilder::Handle::Pg - No longer finds sequences for > > 7.3.x PostgreSQL > > Owner: Nobody > > Requestors: akeep@robotman.org > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=18688 >
> > Can you try out 1.43, already in pause' incoming directory? > > http://pause.perl.org/incoming/ > -j > >


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.