[sf-perl] PostgreSQL DBD ---- repost: sorry, I had the wrong subject in my previous post

Shane Hill shanehill00 at gmail.com
Fri Apr 1 08:52:39 PST 2005

Dan said:

> For MySQL and SQLite I do the insert and then get the
> last insert ID, 

yup. and the docs state that the last_insert_id should work for
postgres but it does not, AFAICT, for the 7.x.x servers.  I will try 8

> for PostgreSQL I do a:
>    SELECT NEXTVAL('table_id_seq')
> And insert with that value.

yeah, I used to do that, but then I switched to retrieving the oid
after I inserted. I would then just select on the oid to retrieve my
object data.  I am trying to get migrated to the DBI entirely and I
have done it except for this one issue. I am sure I will prevail.



More information about the SanFrancisco-pm mailing list