Skip site navigation (1) Skip section navigation (2)

Re: MySQL LAST_INSERT_ID() to Postgres

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Joshua Drake" <jd(at)commandprompt(dot)com>
Cc: Bill <pg(at)dbginc(dot)com>, "Steve Atkins" <steve(at)blighty(dot)com>, "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: MySQL LAST_INSERT_ID() to Postgres
Date: 2008-08-28 22:46:19
Message-ID: dcc563d10808281546r5aaba4a5g53a8980408320340@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-general
On Thu, Aug 28, 2008 at 4:18 PM, Joshua Drake <jd(at)commandprompt(dot)com> wrote:
> On Thu, 28 Aug 2008 16:06:14 -0600
> "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)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.

In response to

Responses

pgsql-general by date

Next:From: Joshua DrakeDate: 2008-08-28 23:04:12
Subject: Re: MySQL LAST_INSERT_ID() to Postgres
Previous:From: Joshua DrakeDate: 2008-08-28 22:44:53
Subject: Re: MySQL LAST_INSERT_ID() to Postgres

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group