X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C9BA5D1B4C2 for ; Wed, 31 Dec 2003 08:20: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 50088-09 for ; Wed, 31 Dec 2003 04:19:51 -0400 (AST) Received: from ideafix.webnow.com.br (ideafix.webnow.com.br [200.155.4.67]) by svr1.postgresql.org (Postfix) with ESMTP id 4FD5BD1B531 for ; Wed, 31 Dec 2003 04:19:49 -0400 (AST) Received: by ideafix.webnow.com.br (Postfix, from userid 48) id 0E1A31C406A; Wed, 31 Dec 2003 06:19:49 -0200 (BRST) Received: from 148100.cps.virtua.com.br ([200.174.148.100]) (SquirrelMail authenticated user marcus.magalhaes@vlinfo.com.br) by webmail.webnow.com.br with HTTP; Wed, 31 Dec 2003 06:19:49 -0200 (BRST) Message-ID: <61203.200.174.148.100.1072858789.squirrel@webmail.webnow.com.br> Date: Wed, 31 Dec 2003 06:19:49 -0200 (BRST) Subject: Re: getGeneratedKeys() From: "Marcus Andree S. Magalhaes" To: In-Reply-To: <33309.213.89.23.209.1072826327.squirrel@www.dsv.su.se> References: <3FF1C0EE.4010107@dsv.su.se> <32899.213.89.23.209.1072821322.squirrel@www.dsv.su.se> <1216.192.168.0.64.1072824461.squirrel@mercury.wardbrook.com> <33309.213.89.23.209.1072826327.squirrel@www.dsv.su.se> X-Priority: 3 Importance: Normal Cc: , X-Mailer: SquirrelMail (version 1.2.11) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/205 X-Sequence-Number: 8941 Ahhh.... yes.... good and old "multiplatform code compatibility"... I remember that from '95, when version Beta 2.0 arrived and I started to write Java code in applets... There was a cool hack around to use Netscape to compile code and generate a class file under Linux 1.2... The promiss of "write once, run everywhere". Frames used AWT back then and all have the same cup of cofee when iconized. After all, the mac wasn;t able to iconize frames. Well, some flexibility was trade off in the name of compatibility. Fine... Then, we had to deal with threading issues in Solaris and Windows... After that, JDBC arrived... True, multiplatform db access. A query as complex as "select gettime()" could run in SQL Server and Postgres (or it was called PostgreSQL at that time ?) and return the same kind of data: a timestamp-like data in SQL Server and an error in Postgres. Since then, I never believed in platform independent coding. And it was a long time ago.... >> Can you do the insert using a function instead, and return the currval >> on the underlying sequence? >> >> John >> > > I'm not sure what you mean. A stored procedure? > > The good thing about getGeneratedKeys() is that you don't have to write > DB-specific code. > -- > Henrik > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org