Re: getting back autonumber just inserted

From: Larry Meadors <larry(dot)meadors(at)gmail(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: PFC <lists(at)boutiquenumerique(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: getting back autonumber just inserted
Date: 2005-07-08 02:09:45
Message-ID: a10a823c0507071909514c815b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Sounds like M$ SuckQL's @@identity value. ;-)

Larry

On 7/7/05, Michael Fuhr <mike(at)fuhr(dot)org> wrote:
> On Fri, Jul 08, 2005 at 01:56:26AM +0200, PFC wrote:
> > >Do you mean with lastval()? Here's what happens:
> >
> > Hm, interesting, you mean the return value of lastval() also depends
> > if you set your constraints to deferred or immediate ?
>
> My mind's ablank trying to contrive a situation where that would
> matter. Can you provide an example?
>
> In any case, I simply meant to point out that 8.1's lastval() will
> be seductively convenient because you don't have to pass it a
> sequence name, but the value it returns might not be the value you
> want.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-07-08 02:21:42 Re: Make COUNT(*) Faster?
Previous Message Michael Fuhr 2005-07-08 01:49:51 Re: getting back autonumber just inserted