X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 613AD9FA318 for ; Wed, 16 Aug 2006 21:35:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 33195-10 for ; Wed, 16 Aug 2006 21:35:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 36D599FB2B8 for ; Wed, 16 Aug 2006 21:35:25 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1GDVqd-00019H-00; Wed, 16 Aug 2006 20:34:59 -0400 To: Georgi Kolev Cc: pgsql-interfaces@postgresql.org Subject: Re: PQoidValue - get last ID of primary key after INSERT - small References: <17604.1155235245@sss.pgh.pa.us> In-Reply-To: From: Gregory Stark Organization: EnterpriseDB Date: 16 Aug 2006 20:34:58 -0400 Message-ID: <87psf0xkr1.fsf@stark.xeocode.com> Lines: 12 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.105 tagged_above=0 required=5 tests=AWL, SPF_SOFTFAIL X-Spam-Level: * X-Archive-Number: 200608/21 X-Sequence-Number: 6235 Georgi Kolev writes: > I agree that the solution INSERT...RETURNING is more general and flexible. But > I think if we have such a solution as @@identity as in Sybase, PostgreSQL will > be much more compatible and adoptable for migrations. What characteristic does @@identity have that lastval() lacks? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com