in reply to Class::DBI and 'serial' columns in PostgreSQL

It seems that it is doing INSERT INTO declaration (freetext,id) VALUES ('aaasdds',null); ... What if you add:
__PACKAGE__->columns(Primary => 'id'); # y, i know it implictly use +s the first column __PACKAGE__->sequence('declaration_id_seq');
(An educated guess based on the example at Class::DBI::Pg)

Replies are listed 'Best First'.
Re^2: Class::DBI and 'serial' columns in PostgreSQL
by zby (Vicar) on Aug 16, 2005 at 19:41 UTC
    Thanks! __PACKAGE__->sequence('declaration_id_seq'); did the trick. The primary key was deduced all right.