: [EMAIL PROTECTED]
Subject:Re: [GENERAL] How to get seq after insert
Michael J Davis wrote:
>
> If two users insert into the same table at the same time, one of
the users
> will get the wrong currval back. I still believe that getting th
Hmm, Ross needs to break for lunch - his brain is runing out of glucose!
Ross J. Reedstrom wrote:
>
> No, as Herouth pointed out, currval is multiuser-safe: it returns the
> last value given in the current session, and every user get's their own
gets
> session. I just tried it out in two psql s
On Thu, 15 Apr 1999, Bruce Momjian wrote:
> > On Wed, 14 Apr 1999, Michael Davis wrote:
> >
> > > The safest way is to select the nextval('seq_name') and then insert using
> > > this value.
> >
> > I understand, I just thought something like, I do the insert, and then
> > grab the value with:
> On Wed, 14 Apr 1999, Michael Davis wrote:
>
> > The safest way is to select the nextval('seq_name') and then insert using
> > this value.
>
> I understand, I just thought something like, I do the insert, and then
> grab the value with:
>
> $insertid = $sth->{'insertid'};
The OID is returned
On Wed, 14 Apr 1999, Michael Davis wrote:
> The safest way is to select the nextval('seq_name') and then insert using
> this value.
I understand, I just thought something like, I do the insert, and then
grab the value with:
$insertid = $sth->{'insertid'};
assuming field "insertid" was the on
The safest way is to select the nextval('seq_name') and then insert using
this value.
-Original Message-
From: Brian [SMTP:[EMAIL PROTECTED]]
Sent: Wednesday, April 14, 1999 2:59 PM
To: [EMAIL PROTECTED]
Subject:[GENERAL] How to get