pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Larry Meadors <larry.meadors@gmail.com>
To: Michael Fuhr <mike@fuhr.org>
Cc: PFC <lists@boutiquenumerique.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: getting back autonumber just inserted
Date: Thu, 7 Jul 2005 20:09:45 -0600
Message-ID: <a10a823c0507071909514c815b@mail.gmail.com> (raw)
In-Reply-To: <20050708014950.GA3339@winnie.fuhr.org>
References: <42CD6B58.6060508@techevolution.be>
	<20050707201433.94901.qmail@web41013.mail.yahoo.com>
	<20050707203715.GA26528@winnie.fuhr.org>
	<a10a823c05070713473add03d7@mail.gmail.com>
	<20050707205725.GA28200@winnie.fuhr.org>
	<op.stkdygr8th1vuj@localhost>
	<20050707224452.GA50696@winnie.fuhr.org>
	<op.stkh4cegth1vuj@localhost>
	<20050708014950.GA3339@winnie.fuhr.org>

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

Larry

On 7/7/05, Michael Fuhr <mike@fuhr.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/
>



view thread (30+ messages)  latest in thread

Message-ID: <a10a823c0507071909514c815b@mail.gmail.com>
Permalink:  ../a10a823c0507071909514c815b@mail.gmail.com/
Also on:    postgresql.org/message-id/a10a823c0507071909514c815b@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: larry.meadors@gmail.com, mike@fuhr.org, lists@boutiquenumerique.com
  Subject: Re: getting back autonumber just inserted
  In-Reply-To: <a10a823c0507071909514c815b@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox