Re: Getting last insert value - Mailing list pgsql-sql

From Greg Stark
Subject Re: Getting last insert value
Date
Msg-id 8765hlmsgr.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: Getting last insert value  (Guillaume LELARGE <gleu@wanadoo.fr>)
Responses Re: Getting last insert value  (Yasir Malik <ymalik@cs.stevens-tech.edu>)
List pgsql-sql
Guillaume LELARGE <gleu@wanadoo.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



pgsql-sql by date:

Previous
From: Guillaume LELARGE
Date:
Subject: Re: Getting last insert value
Next
From: ow
Date:
Subject: Re: Programatically switching database