Re: mysql's last_insert_id - Mailing list pgsql-general

From Stuart
Subject Re: mysql's last_insert_id
Date
Msg-id 3F4D24C7.8040000@blueyonder.co.uk
Whole thread Raw
In response to mysql's last_insert_id  (Michal Adamczakk <pokryfka@artland.com.pl>)
List pgsql-general
Michal Adamczakk wrote:

> hi,
>
> how to implement mysql's last_insert_id() ?
>
> i know that seqences and oids are great.
> the one thing i miss is that they are not session specific.
>
> i mean selecting last_value from seqence can give me a value which was
> inserted by a different user.
>
> regards
> Michal
>

The currval('seq_name') returns the last for the specific connection,
not the last returned of any
hth,
- Stuart



pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: postgresql not using index even though it's faster
Next
From: elein
Date:
Subject: Clarifying File System Syncs