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 A5CB4D1B486 for ; Fri, 19 Dec 2003 08:43:48 +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 54636-07 for ; Fri, 19 Dec 2003 04:43:01 -0400 (AST) Received: from server5.safe-entry.net (unknown [69.56.186.2]) by svr1.postgresql.org (Postfix) with SMTP id 0FF39D1B46B for ; Fri, 19 Dec 2003 04:42:44 -0400 (AST) Received: (qmail 31212 invoked from network); 19 Dec 2003 08:33:13 -0000 Received: from unknown (HELO bandeng) (61.94.188.203) by 0 with SMTP; 19 Dec 2003 08:33:13 -0000 Message-ID: <044a01c3c609$b4772ba0$0200a8c0@bandeng> From: "Ricky" To: "postgre" References: <034201c3c5c3$de1e05f0$0200a8c0@bandeng> <002001c3c600$eb3f9c20$0100a8c0@ropelxp> Subject: Re: get last oid Date: Fri, 19 Dec 2003 16:25:23 +0800 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.1106 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/52 X-Sequence-Number: 3590 thanks Roberto, i'm new in vb and also in postgresql, well, if there'no function to get the last oid, how to catch the message INSERT 2237168 1 in visual basic ? if no, maybe i have to try to select the bigest oid to get it but i'm affraid while somebody insert in the same time, the oid will not match. you have suggestion about this? BR Ricky ----- Original Message ----- From: "Ropel" To: "postgre" Sent: Friday, December 19, 2003 3:20 PM Subject: Re: [ODBC] get last oid > 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 > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > >