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
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

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] How to get