RE: [GENERAL] How to get seq after insert

From: Michael Davis <michael(dot)davis(at)tvguide(dot)com>
To: "'Brian'" <signal(at)shreve(dot)net>, pgsql-general(at)postgreSQL(dot)org
Subject: RE: [GENERAL] How to get seq after insert
Date: 1999-04-14 21:39:44
Message-ID: 93C04F1F5173D211A27900105AA8FCFC1453BF@lambic.prevuenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

The safest way is to select the nextval('seq_name') and then insert using
this value.

-----Original Message-----
From: Brian [SMTP:signal(at)shreve(dot)net]
Sent: Wednesday, April 14, 1999 2:59 PM
To: pgsql-general(at)postgreSQL(dot)org
Subject: [GENERAL] How to get seq after insert

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) signal(at)shreve(dot)net
318-222-2638 x 109 http://www.shreve.net/~signal
Network Administrator ShreveNet Inc. (ASN 11881)

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brian 1999-04-14 21:54:41 RE: [GENERAL] How to get seq after insert
Previous Message Bryan White 1999-04-14 21:31:44 Regression test core dumps