From: Ropel <ropel@ropel.it>
To: postgre <pgsql-odbc@postgresql.org>
Subject: Re: get last oid
Date: Fri, 19 Dec 2003 08:20:56 +0100
Message-ID: <002001c3c600$eb3f9c20$0100a8c0@ropelxp> (raw)
References: <034201c3c5c3$de1e05f0$0200a8c0@bandeng>
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@babonmultimedia.com>
To: "postgre" <pgsql-odbc@postgresql.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
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: ropel@ropel.it
Subject: Re: get last oid
In-Reply-To: <002001c3c600$eb3f9c20$0100a8c0@ropelxp>
References: <034201c3c5c3$de1e05f0$0200a8c0@bandeng> <002001c3c600$eb3f9c20$0100a8c0@ropelxp>
* 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