Re: mysql's last_insert_id

From: "Eric Johnson" <ej(at)ejinnovations(dot)com>
To: "Michal Adamczakk" <pokryfka(at)artland(dot)com(dot)pl>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: mysql's last_insert_id
Date: 2003-08-27 03:20:48
Message-ID: 00ba01c36c4a$36379d60$1a08090a@MINIDEV
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm doing this in an app right now by using stored procedures and sequences.
The stored procedure for a table will get the next value of the sequence and
use that in the insert statement. It then returns that id as the result so
the application can use it elsewhere.

Eric Johnson

----- Original Message -----
From: "Michal Adamczakk" <pokryfka(at)artland(dot)com(dot)pl>
To: <pgsql-general(at)postgresql(dot)org>
Sent: Friday, August 22, 2003 3:03 PM
Subject: [GENERAL] mysql's last_insert_id

> 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
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2003-08-27 03:25:41 Re: [GENERAL] Replication Ideas
Previous Message Ron Johnson 2003-08-27 02:17:34 Re: update entire table (with PostGreSQL alone)?