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

Josh Berkus josh at agliodbs.com
Fri Apr 1 08:56:10 PST 2005


> If you have multiple users of the database (ala, say, a web app),
> doing the
>    SELECT CURRVAL('table_id_seq')
> allows for another insert to sneak in between your insert and the
> select.

Only if those multiple users share a database connection (e.g. multi-threaded 
app).   CURRVAL is session-specific.

Josh Berkus
Aglio Database Solutions
San Francisco

More information about the SanFrancisco-pm mailing list