pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jean-Luc Lachance <jllachan@nsd.ca>
To: iloz@recursor.hu
Cc: pgsql-odbc@postgresql.org
Subject: Re: ROWID ? or other internal ID
Date: Thu, 10 Oct 2002 12:12:11 -0400
Message-ID: <3DA5A6DB.C8396D9@nsd.ca> (raw)
References: <Pine.LNX.4.21.0210101008130.15201-100000@www.recursor.com>

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



view thread (7+ messages)

Message-ID: <3DA5A6DB.C8396D9@nsd.ca>
Permalink:  ../3DA5A6DB.C8396D9@nsd.ca/
Also on:    postgresql.org/message-id/3DA5A6DB.C8396D9@nsd.ca

 · 

reply

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: <3DA5A6DB.C8396D9@nsd.ca>
  References: <Pine.LNX.4.21.0210101008130.15201-100000@www.recursor.com> <3DA5A6DB.C8396D9@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