[Dbix-class] PK::Auto::Pg bugfix: GUINEA PIGS WANTED

Krzysztof Krzyzaniak eloy at kofeina.net
Thu Nov 24 12:38:00 CET 2005


Matt S Trout wrote:
> On Wed, Nov 23, 2005 at 01:31:32PM -0600, Brandon Black wrote:
> 
>>Been away from the keyboard for a number of days, I'll get caught up
>>on the backlogged email after this weekend probably.  But in the
>>meantime...
>>
>>As of PostgreSQL 8.1, autoincrementing sequences can (and should) be
>>specified differently than before.  To cover the new syntax, a small
>>change needs to be made to Class/DBIx/PK/Auto/Pg.pm.  Works For Me,
>>YMMV:
>>
>>30c30
>><         m!^nextval\('"?([^"']+)"?'::(?:text|regclass)\)!;
>>---
>>
>>>        m!^nextval\('"?([^"']+)"?'::text\)!;
> 
> 
> I (as usual) don't have a postgres install handy, can those who do apply and
> report results please?

Dump in pg8.1 shows serial primary keys as:

id bigint DEFAULT nextval(('account_id_seq'::text)::regclass) NOT NULL,

I can test patch tonight.

   eloy
-- 
-------e-l-o-y---------------------------e-l-o-y- at -k-o-f-e-i-n-a-.-n-e-t------

        jak to dobrze, że są oceany - bez nich byłoby jeszcze smutniej



More information about the Dbix-class mailing list