From: Jean-Luc Lachance <jllachan@nsd.ca>
To: iloz@recursor.hu
Cc: pgsql-odbc@postgresql.org
Subject: Re: ROWID ? or other internal ID
Date: Wed, 09 Oct 2002 11:29:16 -0400
Message-ID: <3DA44B4C.3BCACBB7@nsd.ca> (raw)
References: <Pine.LNX.4.21.0210091135330.21391-100000@www.recursor.com>
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
>
> On Tue, 8 Oct 2002, Jean-Luc Lachance wrote:
>
> > You want OID as in:
> >
> > Select OID, * from table;
>
> ___________________________________________________________________________
> Nagy Zoltan iloz@falcon.sch.bme.hu Phone: +36-30-2699112
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: jllachan@nsd.ca, iloz@recursor.hu
Subject: Re: ROWID ? or other internal ID
In-Reply-To: <3DA44B4C.3BCACBB7@nsd.ca>
References: <Pine.LNX.4.21.0210091135330.21391-100000@www.recursor.com> <3DA44B4C.3BCACBB7@nsd.ca>
* 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