[CDBI] DBI's last_insert_id and Class::DBI's _auto_increment_value

Bill Moseley moseley at hank.org
Mon Nov 21 13:48:41 GMT 2005


On Mon, Nov 21, 2005 at 08:37:59AM -0500, David Steinbrunner wrote:
> In the process of the getting Postgres working I ran into "Can't get last
> insert id".  I immediately did a Google search for last_insert_id and
> Class::DBI since I have used last_insert_id in a past database agnostic
> system.  I came upon the following:

Do you have your sequences defined?  I have this in my class:

    DB::Person->table( 'person' );
    DB::Person->columns( Primary => qw / id / );
    DB::Person->sequence( 'public.person_id_seq' );





-- 
Bill Moseley
moseley at hank.org





More information about the ClassDBI mailing list