X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C9B0252965 for ; Thu, 7 Jul 2005 23:09:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 54448-01 for ; Fri, 8 Jul 2005 02:09:42 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.206]) by svr1.postgresql.org (Postfix) with ESMTP id B24B452995 for ; Thu, 7 Jul 2005 23:09:40 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id 18so157570nzp for ; Thu, 07 Jul 2005 19:09:45 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tnSi+86OrEDdeuHWgOGKjlzzBvlQbeuGJChWIK70z5L394cPIiF/apIZUXPTTU7m5zQhuWH3Lmfvp46mVT6zK9nO7peikkkXg1VMPUqa66onV6fq9s2RjOQzbWpL44qsnHO5K0AUZ9wMAN8vgt7QRltpZ8eKO6IBFqPIT6/9Lis= Received: by 10.36.36.10 with SMTP id j10mr493757nzj; Thu, 07 Jul 2005 19:09:45 -0700 (PDT) Received: by 10.36.90.14 with HTTP; Thu, 7 Jul 2005 19:09:45 -0700 (PDT) Message-ID: Date: Thu, 7 Jul 2005 20:09:45 -0600 From: Larry Meadors Reply-To: lmeadors@apache.org To: Michael Fuhr Subject: Re: getting back autonumber just inserted Cc: PFC , pgsql-sql@postgresql.org In-Reply-To: <20050708014950.GA3339@winnie.fuhr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42CD6B58.6060508@techevolution.be> <20050707201433.94901.qmail@web41013.mail.yahoo.com> <20050707203715.GA26528@winnie.fuhr.org> <20050707205725.GA28200@winnie.fuhr.org> <20050707224452.GA50696@winnie.fuhr.org> <20050708014950.GA3339@winnie.fuhr.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=AWL, RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200507/120 X-Sequence-Number: 22098 Sounds like M$ SuckQL's @@identity value. ;-) Larry On 7/7/05, Michael Fuhr 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 ? >=20 > My mind's ablank trying to contrive a situation where that would > matter. Can you provide an example? >=20 > 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. >=20 > -- > Michael Fuhr > http://www.fuhr.org/~mfuhr/ >