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

From Eric Johnson
Subject Re: mysql's last_insert_id
Date
Msg-id 00ba01c36c4a$36379d60$1a08090a@MINIDEV
Whole thread Raw
In response to mysql's last_insert_id  (Michal Adamczakk <pokryfka@artland.com.pl>)
List 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@artland.com.pl>
To: <pgsql-general@postgresql.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
>



pgsql-general by date:

Previous
From: "Juris Krumins"
Date:
Subject: Again about temporary table
Next
From: Christian Traber
Date:
Subject: pgplsql - Oracle nvl