[Catalyst] How to update row in Postgres when SERIAL PRIMARY KEY?
Matt S Trout
dbix-class at trout.me.uk
Tue Jul 4 21:27:42 CEST 2006
Dennis Daupert wrote:
> I know how in mysql, but still new to postgresql, trying to learn. In
> mysql, when there's an autoincremented integer primary key, you don't
> mention that field on inserts; it just gets handled. In postgresql, when
> I try that, he complains. Also complains if I try to set id to '',
> 'undef', 'DEFAULT', and various other tries.
Don't set it to anything, or set it to undef().
Make sure you loaded PK::Auto if you need autoincremented primary key support
in a DBIC result class.
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst