Re: SEQUENCE primary key - Mailing list pgsql-general

From Chris
Subject Re: SEQUENCE primary key
Date
Msg-id 45D26EB6.9090500@gmail.com
Whole thread Raw
In response to Re: SEQUENCE primary key  (John McCawley <nospam@hardgeus.com>)
Responses Re: SEQUENCE primary key  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
John McCawley wrote:
> In PostgreSQL 8 and up:
>
> SELECT lastval();

Actually it's better to use currval.

See
http://people.planetpostgresql.org/xzilla/index.php?/archives/169-Is-lastval-evil.html

--
Postgresql & php tutorials
http://www.designmagick.com/

pgsql-general by date:

Previous
From: John McCawley
Date:
Subject: Re: SEQUENCE primary key
Next
From: Rajarshi Guha
Date:
Subject: suggestions on improving a query