Re: MySQL LAST_INSERT_ID() to Postgres - Mailing list pgsql-general

From Joshua Drake
Subject Re: MySQL LAST_INSERT_ID() to Postgres
Date
Msg-id 20080828160412.63252834@jd-laptop
Whole thread Raw
In response to Re: MySQL LAST_INSERT_ID() to Postgres  ("Scott Marlowe" <scott.marlowe@gmail.com>)
List pgsql-general
On Thu, 28 Aug 2008 16:46:19 -0600
"Scott Marlowe" <scott.marlowe@gmail.com> wrote:

> On Thu, Aug 28, 2008 at 4:18 PM, Joshua Drake <jd@commandprompt.com>
> wrote:
> > On Thu, 28 Aug 2008 16:06:14 -0600
> > "Scott Marlowe" <scott.marlowe@gmail.com> wrote:
> >> No, setval, currval, and lastval all require as an argument a
> >> sequence name.  So the real issue is you have to know the sequence
> >> name to use them.
> >
> > lastval() does not take a sequence name.
>
> Sorry, haven't used lastval before, was making an incorrect
> assumption about it.
>

FYI, I wouldn't use it either.

Joshua D. Drake

--
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate



pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: MySQL LAST_INSERT_ID() to Postgres
Next
From: Tom Lane
Date:
Subject: Re: indexes on functions and create or replace function