Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3AFC9475F55 for ; Thu, 10 Oct 2002 12:12:08 -0400 (EDT) Received: from beamish.nsd.ca (unknown [205.150.156.194]) by postgresql.org (Postfix) with ESMTP id 73527475F16 for ; Thu, 10 Oct 2002 12:12:07 -0400 (EDT) Received: (from smap@localhost) by beamish.nsd.ca (8.9.3/8.9.3) id MAA03144; Thu, 10 Oct 2002 12:11:49 -0400 X-Authentication-Warning: beamish.nsd.ca: smap set sender to using -f Received: from reddog.nsd.ca(192.168.101.30) by beamish.nsd.ca via smap (V2.1/2.1+anti-relay+anti-spam) id xma003142; Thu, 10 Oct 02 12:11:46 -0400 Received: from nsd.ca (jllachan-linux.nsd.ca [192.168.101.148]) by reddog.nsd.ca (8.8.7/8.8.7) with ESMTP id MAA24159; Thu, 10 Oct 2002 12:11:22 -0400 Message-ID: <3DA5A6DB.C8396D9@nsd.ca> Date: Thu, 10 Oct 2002 12:12:11 -0400 From: Jean-Luc Lachance X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.9-31 i686) X-Accept-Language: en MIME-Version: 1.0 To: iloz@recursor.hu Cc: pgsql-odbc@postgresql.org Subject: Re: ROWID ? or other internal ID References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/61 X-Sequence-Number: 2146 Just create a stored procedure that returns RESULT_OID; iloz@recursor.hu wrote: > > Ok, but how can I use this with ODBC? > > On Wed, 9 Oct 2002, Jean-Luc Lachance wrote: > > > In PL/pgSQL you can : > > > > GET DIAGNOSTICS {variable} = RESULT_OID; > > > > to get the OID of the previous INSERTed, DELETEd or UPDATEd row. > > > > JLL > > > > > > iloz@recursor.hu wrote: > > > > > > Hi! > > > > > > I'm new in postgresql-ODBC but not in postgresql. I use it with PHP long > > > time ago. > > > I use OID for selecting and also for referencing rows. For this I need to > > > know the OID of the last inserted row. In php I have getlastoid function > > > for this. > > > I tried "insert" then "select :LASTOID" with ODBC but it has returned with > > > error. (I tried it in the same connection) > > > How can I get the OID of last inserted row with ODBC? > > > > > > Thanks > > > Zoltan > > ___________________________________________________________________________ > Nagy Zoltan iloz@falcon.sch.bme.hu Phone: +36-30-2699112 > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org