Re: get last oid

From: "Ropel" <ropel(at)ropel(dot)it>
To: "postgre" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: get last oid
Date: 2003-12-19 07:20:56
Message-ID: 002001c3c600$eb3f9c20$0100a8c0@ropelxp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

PHP uses "pg_last_oid() ": a reliable way because it work's at connection
level (i.e. it will not be affected
by inserts made from other tasks or connections .
I'd try searching starting from there for a solution without php: every
other language i've seen has an equivalent solution.

With "psql" you have:

postgres=# insert into cars(name) values('lamborghini');
INSERT 2237168 1

where 2237168 is the oid...

I hope it willl help...

Roberto

----- Original Message -----
From: "Ricky" <ricky(at)babonmultimedia(dot)com>
To: "postgre" <pgsql-odbc(at)postgresql(dot)org>
Sent: Friday, December 19, 2003 1:05 AM
Subject: [ODBC] get last oid

> hello,
>
> i try get the last oid after INSERT command but i have no idea about
> command/function
> .anyone know or is there any better method?
>
> Thanks
> Ricky
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Ricky 2003-12-19 08:25:23 Re: get last oid
Previous Message Ricky 2003-12-19 00:05:50 get last oid