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

From Yasir Malik
Subject Re: Getting last insert value
Date
Msg-id Pine.SGI.4.58.0311151510140.80813@guinness.cs.stevens-tech.edu
Whole thread Raw
In response to Re: Getting last insert value  (Greg Stark <gsstark@mit.edu>)
List pgsql-sql
Thank you all for your help.
Yasir Malik

On Sat, 15 Nov 2003, Greg Stark wrote:

> Date: 15 Nov 2003 12:50:28 -0500
> From: Greg Stark <gsstark@mit.edu>
> To: Guillaume LELARGE <gleu@wanadoo.fr>
> Cc: Yasir Malik <ymalik@cs.stevens-tech.edu>, pgsql-sql@postgresql.org
> Subject: Re: [SQL] Getting last insert value
>
>
> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>


pgsql-sql by date:

Previous
From: ow
Date:
Subject: Re: Programatically switching database
Next
From: Theodore Petrosky
Date:
Subject: Re: Getting last insert value