Re: [GENERAL] How to get seq after insert - Mailing list pgsql-general

From K.T.
Subject Re: [GENERAL] How to get seq after insert
Date
Msg-id 008401be87e0$d6da3000$28dba5ce@p2-400-death
Whole thread Raw
List pgsql-general
I think writing SQL as a portable as possible to cover eventual upgrades to
larger scale databases is a primary concern.  The Selecting of a sequence is
more portable across various databases...

-----Original Message-----
From: Michael Davis <michael.davis@tvguide.com>
To: 'Brian' <signal@shreve.net>; pgsql-general@postgreSQL.org
<pgsql-general@postgreSQL.org>
Date: Wednesday, April 14, 1999 4:37 PM
Subject: RE: [GENERAL] How to get seq after insert


>The safest way is to select the nextval('seq_name') and then insert using
>this value.
>
> -----Original Message-----
> From: Brian [SMTP:signal@shreve.net]
> Sent: Wednesday, April 14, 1999 2:59 PM
> To: pgsql-general@postgreSQL.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@shreve.net
> 318-222-2638 x 109 http://www.shreve.net/~signal
> Network Administrator   ShreveNet Inc. (ASN 11881)
>
>



pgsql-general by date:

Previous
From: "K.T."
Date:
Subject: Re: [GENERAL] pg_dumpall troubles
Next
From: "K.T."
Date:
Subject: Re: [GENERAL] Database performance