X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 61DD6D1B448 for ; Fri, 19 Dec 2003 07:23:38 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 44212-10 for ; Fri, 19 Dec 2003 03:22:49 -0400 (AST) Received: from ms003msg.fastwebnet.it (ms003msg.fastwebnet.it [213.140.2.42]) by svr1.postgresql.org (Postfix) with ESMTP id 22045D1B444 for ; Fri, 19 Dec 2003 03:22:47 -0400 (AST) Received: from ropelxp (1.40.84.105) by ms003msg.fastwebnet.it (6.7.019) id 3FCB69520025E82C for pgsql-odbc@postgresql.org; Fri, 19 Dec 2003 08:22:44 +0100 Message-ID: <002001c3c600$eb3f9c20$0100a8c0@ropelxp> From: "Ropel" To: "postgre" References: <034201c3c5c3$de1e05f0$0200a8c0@bandeng> Subject: Re: get last oid Date: Fri, 19 Dec 2003 08:20:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/51 X-Sequence-Number: 3589 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" To: "postgre" 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