X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B24129FB2F8 for ; Thu, 10 Aug 2006 15:40:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 47457-02 for ; Thu, 10 Aug 2006 18:40:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 921259FB1F8 for ; Thu, 10 Aug 2006 15:40:48 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k7AIeji8017605; Thu, 10 Aug 2006 14:40:45 -0400 (EDT) To: Georgi Kolev cc: pgsql-interfaces@postgresql.org Subject: Re: PQoidValue - get last ID of primary key after INSERT - small fix In-reply-to: References: Comments: In-reply-to Georgi Kolev message dated "Wed, 09 Aug 2006 14:38:24 +0300" Date: Thu, 10 Aug 2006 14:40:45 -0400 Message-ID: <17604.1155235245@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/17 X-Sequence-Number: 6231 Georgi Kolev writes: > The easiest way to fix the problem were to fix heap_insert() to get the > right value in case there is no OID column declared in the table. Not a chance. I could make a list of objections to that that's longer than your patch, but the short of it is that this is a completely inappropriate level of the system to be doing that kind of work in. What we *are* working on is INSERT RETURNING (in fact I'm about to start work on reviewing/committing that patch right now...), which is a much more general solution to the problem. regards, tom lane