X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id D995DD1C512 for ; Mon, 21 Jul 2003 00:02:59 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 85882-01 for ; Mon, 21 Jul 2003 00:02:54 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id 336C7D1C50F for ; Sun, 20 Jul 2003 21:02:54 -0300 (ADT) Received: from flood.opencloud.co.nz ([192.168.0.31] ident=mail) by yass.opencloud.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 19eO8c-0006vp-00; Mon, 21 Jul 2003 12:02:47 +1200 Received: from oliver by flood.opencloud.co.nz with local (Exim 3.35 #1 (Debian)) id 19eO8X-0000Bg-00; Mon, 21 Jul 2003 12:02:41 +1200 Date: Mon, 21 Jul 2003 12:02:41 +1200 To: Dima Tkach Cc: Kim Ho , Fernando Nasser , Barry Lind , pgsql-jdbc-list , Dave Cramer Subject: Re: Prepared Statements Message-ID: <20030721000241.GB665@opencloud.com> References: <3F18259C.6090503@redhat.com> <1058548037.19658.159.camel@topanga.toronto.redhat.com> <3F183004.4010508@openratings.com> <3F1830F6.3020203@openratings.com> <1058550328.19657.168.camel@topanga.toronto.redhat.com> <3F183423.9030900@openratings.com> <1058551402.20165.177.camel@topanga.toronto.redhat.com> <3F183AE0.8060204@openratings.com> <20030719012555.GA20158@opencloud.com> <3F1AC5D1.4010307@openratings.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F1AC5D1.4010307@openratings.com> User-Agent: Mutt/1.5.4i From: Oliver Jowett X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/187 X-Sequence-Number: 7571 On Sun, Jul 20, 2003 at 12:39:45PM -0400, Dima Tkach wrote: > The problem with this (and other similar suggestions in this thread - > like use PGArray etc.) is that the app will not even compile with > postgres jdbc classes. > The whole point in using jdbc interfaces is to abstract the application > from the particular driver implementation. My current approach is what Fernando suggested -- use setArray() and look for a preceeding IN. This can work without needing any postgres specific classes -- I'll add a simple implementation of java.sql.Array that wraps a Java array to the driver source, but if you don't want to be dependent on the driver you can provide your own implementation. The interface-abstraction argument only really works up to the point where you want to do something not defined in the interface. Usually when I'm doing DB-specific extension stuff I have a per-DB subclass that does the special bits; if you don't have the driver available, you don't compile that subclass. So I don't really buy the "can't build" argument. The same thing applies to extensions like setUseServerPrepare(), BTW. -O