pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
ROWID ? or other internal ID
7+ messages / 4 participants
[nested] [flat]

* ROWID ? or other internal ID
@ 2002-10-08 17:17  valcauda Stéphane <valcauda.aderis@wanadoo.fr>
  0 siblings, 2 replies; 7+ messages in thread

From: valcauda Stéphane @ 2002-10-08 17:17 UTC (permalink / raw)
  To: pgsql-odbc

I'm beginner with postgresql.
In other database like ORACLE or PROGRESS you've got an internal identifier
ROWID or RECID
(bookmark with access) which allow you to select a row very quickly or to go
back to a specific row very quickly.
these functions uses an internal ID.

Does something approaching that exist under postgresql ?
I've search and found nothing except "SERIAL" but that's not an internal ID.

thanks,

Stéphane Valcauda






^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-08 17:18  Jean-Luc Lachance <jllachan@nsd.ca>
  parent: valcauda Stéphane <valcauda.aderis@wanadoo.fr>
  1 sibling, 0 replies; 7+ messages in thread

From: Jean-Luc Lachance @ 2002-10-08 17:18 UTC (permalink / raw)
  To: valcauda Stéphane <valcauda.aderis@wanadoo.fr>; +Cc: pgsql-odbc

You want OID as in:

Select OID, * from table;


valcauda Stéphane wrote:
> 
> I'm beginner with postgresql.
> In other database like ORACLE or PROGRESS you've got an internal identifier
> ROWID or RECID
> (bookmark with access) which allow you to select a row very quickly or to go
> back to a specific row very quickly.
> these functions uses an internal ID.
> 
> Does something approaching that exist under postgresql ?
> I've search and found nothing except "SERIAL" but that's not an internal ID.
> 
> thanks,
> 
> Stéphane Valcauda
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-09 04:55  Tom Lane <tgl@sss.pgh.pa.us>
  parent: valcauda Stéphane <valcauda.aderis@wanadoo.fr>
  1 sibling, 0 replies; 7+ messages in thread

From: Tom Lane @ 2002-10-09 04:55 UTC (permalink / raw)
  To: valcauda Stéphane <valcauda.aderis@wanadoo.fr>; +Cc: pgsql-odbc

=?iso-8859-1?Q?valcauda_St=E9phane?= <valcauda.aderis@wanadoo.fr> writes:
> In other database like ORACLE or PROGRESS you've got an internal identifier
> ROWID or RECID
> (bookmark with access) which allow you to select a row very quickly or to go
> back to a specific row very quickly.
> these functions uses an internal ID.

CTID allows direct access to a row --- but it's invalidated by an
update, so it might not be very useful for you.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-09 09:35  iloz@recursor.hu
  0 siblings, 1 reply; 7+ messages in thread

From: iloz@recursor.hu @ 2002-10-09 09:35 UTC (permalink / raw)
  To: pgsql-odbc

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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-09 15:29  Jean-Luc Lachance <jllachan@nsd.ca>
  parent: iloz@recursor.hu
  0 siblings, 0 replies; 7+ messages in thread

From: Jean-Luc Lachance @ 2002-10-09 15:29 UTC (permalink / raw)
  To: iloz@recursor.hu; +Cc: pgsql-odbc

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-10 08:08  iloz@recursor.hu
  0 siblings, 1 reply; 7+ messages in thread

From: iloz@recursor.hu @ 2002-10-10 08:08 UTC (permalink / raw)
  To: pgsql-odbc

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





^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: ROWID ? or other internal ID
@ 2002-10-10 16:12  Jean-Luc Lachance <jllachan@nsd.ca>
  parent: iloz@recursor.hu
  0 siblings, 0 replies; 7+ messages in thread

From: Jean-Luc Lachance @ 2002-10-10 16:12 UTC (permalink / raw)
  To: iloz@recursor.hu; +Cc: pgsql-odbc

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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2002-10-10 16:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-08 17:17 ROWID ? or other internal ID valcauda Stéphane <valcauda.aderis@wanadoo.fr>
2002-10-08 17:18 ` Jean-Luc Lachance <jllachan@nsd.ca>
2002-10-09 04:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2002-10-09 09:35 Re: ROWID ? or other internal ID iloz@recursor.hu
2002-10-09 15:29 ` Jean-Luc Lachance <jllachan@nsd.ca>
2002-10-10 08:08 Re: ROWID ? or other internal ID iloz@recursor.hu
2002-10-10 16:12 ` Jean-Luc Lachance <jllachan@nsd.ca>

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