X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.225.181]) by svr1.postgresql.org (Postfix) with ESMTP id CEDA8D1C515 for ; Mon, 21 Jul 2003 15:14:29 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr5.postgresql.org [64.117.225.181]) (amavisd-new, port 10024) with ESMTP id 37705-01 for ; Mon, 21 Jul 2003 15:14:18 +0000 (GMT) Received: from exchange.hq.openratings.com (unknown [141.149.165.226]) by svr1.postgresql.org (Postfix) with ESMTP id B831FD1C50D for ; Mon, 21 Jul 2003 12:14:17 -0300 (ADT) Received: from openratings.com (cancun.hq.openratings.com [10.0.0.225]) by exchange.hq.openratings.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 38QMVXAC; Mon, 21 Jul 2003 11:14:17 -0400 Message-ID: <3F1C0355.6090709@openratings.com> Date: Mon, 21 Jul 2003 11:14:29 -0400 From: Dmitry Tkach User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Csaba Nagy Cc: Oliver Jowett , pgsql-jdbc-list Subject: Re: Prepared Statements References: <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> <20030721000241.GB665@opencloud.com> <3F1B51C5.4080108@openratings.com> <20030721030157.GE665@opencloud.com> <3F1BF78F.4040604@openratings.com> <1058799337.25132.327.camel@coppola.ecircle.de> In-Reply-To: <1058799337.25132.327.camel@coppola.ecircle.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/267 X-Sequence-Number: 7651 > > >But please... did you ever use a different database than Postgres ? The >way you're passing the parameters is VERY much postgres specific, >furthermore, it relies on some non-standard behavior... > > Yes. That's what I meant below - 'the lesser of two evils' > > >>I am just choosing the lesser of two evils. >>At least, I don't need to know what database I am going to be working >>with when I compile the code. >> >> > >... which problem you wouldn't have if you would use standard JDBC code. > True. I would not have this problem then. I would have another problem - just no way to pass a set or array in whatsoever.... :-) I know a better way to not have problems - if I just didn't do anything at all, I would not have any. :-) >I agree that standards suck sometime, but then if you want to use a DB >specific feature, I can't see why not make it a compile time necessity - >it might be a further benefit to remind you that your code will not work >with other databases. > I explained the reason for not making it a 'compile time necessity' earlier - there is no way whatsoever I can have all possible jdbc drivers in the world available to me at compile time. >But yes you force your customers to use Postgres, or maybe to a set of >databases which accept this hack - it is not standard. > > I don't force them to use Postgres. I do have the driver-specific logic that uses the correct way to pass in the parameters depending on the driver. The difference is that this is *run-time* logic, not *compilation-time*. > > >>With your suggestion, the only way I can have the above is to pack all >>the possible jdbc drivers into every build of the app... >> >> > >Yes, all the drivers which you are using special features from. That >makes perfect sense - those are vendor specific dependencies in your >code, the library will remind you about it all the time so you don't >forget to tell the customers about it ;-) > > It doesn't matter really if it makes sense or not (to me, it doesn't anyway). It is just not possible to do. I simply do not have all the drivers in the world available to me. Even if I did, I can't begin to imagine what my customers would tell when they finish laughing after receiving an app from me, with all the possible drivers built in :-) As for not forgetting to tell the customers about it - that's the whole idea - I am *not* telling the customers about it, they don't want to know that, and don't need to care. Dima