RE: [GENERAL] How to get seq after insert

1999-04-20 Thread Michael J Davis
: [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

Re: [GENERAL] How to get seq after insert

1999-04-20 Thread Ross J. Reedstrom
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

Re: [GENERAL] How to get seq after insert]

1999-04-15 Thread Karl DeBisschop
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:

Re: [GENERAL] How to get seq after insert]

1999-04-14 Thread Bruce Momjian
> 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

RE: [GENERAL] How to get seq after insert

1999-04-14 Thread Brian
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] >

RE: [GENERAL] How to get seq after insert

1999-04-14 Thread Michael Davis
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]

[GENERAL] How to get seq after insert

1999-04-14 Thread Brian
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