Re: ROWID ? or other internal ID

From: Jean-Luc Lachance <jllachan(at)nsd(dot)ca>
To: iloz(at)recursor(dot)hu
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: ROWID ? or other internal ID
Date: 2002-10-10 16:12:11
Message-ID: 3DA5A6DB.C8396D9@nsd.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Just create a stored procedure that returns RESULT_OID;

iloz(at)recursor(dot)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(at)recursor(dot)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(at)falcon(dot)sch(dot)bme(dot)hu Phone: +36-30-2699112
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Alexaki Sofia 2002-10-10 16:16:07 Time type error
Previous Message mhepwort 2002-10-10 15:03:56 pgAdmin2 and Odbc fixed