: [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
ming field "insertid" was the one being updated by the sequence, but
that doenst seem to work.
>
> -Original Message-
> From: Brian [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, April 14, 1999 2:59 PM
> To: [EMAIL PROTECTED]
>
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]
I have a sequence in a table that increments upon insert. After doing the
insert, is their a way (function maybe?) to get the sequences value
without having to do another select?
Brian
-
Brian Feeny (BF304) [EMAIL PROTECTED]
318-222-2