Re: GetLastInsertID ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: Mike Nolan <nolan(at)gw(dot)tssi(dot)com>, kleptog(at)svana(dot)org, db(at)zigo(dot)dhs(dot)org (Dennis Bjorklund), spinel(at)noos(dot)fr (Stephane Pinel), pgsql-general(at)postgresql(dot)org
Subject: Re: GetLastInsertID ?
Date: 2004-01-05 05:19:10
Message-ID: 21842.1073279950@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Doug McNaught <doug(at)mcnaught(dot)org> writes:
> Mike Nolan <nolan(at)gw(dot)tssi(dot)com> writes:
>> Is currval for each process maintained at the front end (e.g., the PHP or
>> psql connection) or at the back end?

The latter.

>> If the latter, isn't there always
>> the potential for memory overflows or other high-demand situations causing
>> the pairing of nextval/currval to get corrupted or lost, in which case
>> RELYING upon it for the last key value could be a source of problems.

> How, exactly, would this happen? Is this worry based on an analysis
> of the source code, or just speculation?

Perhaps more to the point, what in the world makes you think that
storage at the front end would be safer? The backend we have some
control over.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-01-05 05:32:24 Re: altering a column
Previous Message Greg Stark 2004-01-05 04:47:29 Re: why the need for is null?