Re: mysql's last_insert_id

From: Stuart <deststar(at)blueyonder(dot)co(dot)uk>
To: Michal Adamczakk <pokryfka(at)artland(dot)com(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: mysql's last_insert_id
Date: 2003-08-27 21:38:15
Message-ID: 3F4D24C7.8040000@blueyonder.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeffrey Melloy 2003-08-27 22:21:03 Re: pgplsql - Oracle nvl
Previous Message Steve Crawford 2003-08-27 21:23:20 Re: greek char