Re: Getting last insert value

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Guillaume LELARGE <gleu(at)wanadoo(dot)fr>
Cc: Yasir Malik <ymalik(at)cs(dot)stevens-tech(dot)edu>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Getting last insert value
Date: 2003-11-15 17:50:28
Message-ID: 8765hlmsgr.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Guillaume LELARGE <gleu(at)wanadoo(dot)fr> writes:

> Doing a "select currval() from my_table" after your insert should work.

That's "select currval('my_table_pkcol_seq')" actually.

The above would have called the currval() function for every record of the
table which isn't what you want and in any case currval takes an argument.

--
greg

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message ow 2003-11-15 18:35:53 Re: Programatically switching database
Previous Message Yasir Malik 2003-11-15 17:43:15 Re: Getting last insert value