X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6C26A52AC3 for ; Mon, 18 Jul 2005 10:52:45 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25404-01 for ; Mon, 18 Jul 2005 13:52:39 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id E970952A3C for ; Mon, 18 Jul 2005 10:52:36 -0300 (ADT) Received: (qmail 30300 invoked from network); 18 Jul 2005 13:52:41 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 18 Jul 2005 13:52:41 -0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v733) X-Priority: 3 Content-Type: multipart/alternative; boundary=Apple-Mail-11--493846472 Message-Id: Cc: pgsql-jdbc@postgresql.org From: Dave Cramer Subject: Re: PreparedStatement.setXXX Date: Mon, 18 Jul 2005 09:52:37 -0400 To: Roberta Campo X-Mailer: Apple Mail (2.733) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.016 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200507/105 X-Sequence-Number: 13253 --Apple-Mail-11--493846472 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Roberta, You can force version 2 protocol with protocolVersion=2 or you can implement the Array interface. For putting information into the db, I would imagine all you need to implement is everything up to getResultSet() Dave On 18-Jul-05, at 7:55 AM, Roberta Campo wrote: > We're moving from Postgresql7.4 to v.8.0.3, > with some problems rising from the strictness of the new driver > postgresql-8.0-311.jdbc3.jar. > > We used to call a function f(integer[]) using > PreparedStatement.setString('{...}') > but now the types are not compatible. > > > How should we fix that ? > > A. Using the setArray method : > This requires the implementation of the interface java.sql.Array : > - which methods are required in this case ? > - is there any available implementation of this class ? :) > > B. Using the setObject(colnumber, String, type ) method : > This should require less implementation than the Array, shouldn't it ? > - how to specify the type int[] ? > > C. Using different drivers / protocol versions / ... > > Thanks, > Roberta > > > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend > > Dave Cramer davec@postgresintl.com www.postgresintl.com ICQ #14675561 jabber davecramer@jabber.org ph (519 939 0336 ) --Apple-Mail-11--493846472 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Roberta,

You can force version 2 = protocol with=A0protocolVersion=3D2

or you can = implement the Array interface.

For putting = information into the db, I would imagine all you need to implement is = everything up to getResultSet()

Dave
On 18-Jul-05, at 7:55 AM, = Roberta Campo wrote:

We're moving from Postgresql7.4 to = v.8.0.3,
with some problems rising from = the strictness of the new driver

We used to call a function = f(integer[]) using
but now = the types are not compatible.


How should we fix that ?

A. Using = the setArray method :
This requires the = implementation of the interface java.sql.Array :
- which methods are required in this case = ?
- is there any available implementation of this = class ? :)

B. Using the setObject(colnumber, String, type ) = method :
This should require less = implementation than the Array, shouldn't it ?
- how to specify the type int[] ?

C. Using = different drivers / protocol versions / ...

=A0Thanks,
Roberta



TIP 6: = explain analyze is your friend





<= DIV>
Dave Cramer
www.postgresintl.com
ICQ #14675561
= ph (519 939 0336 )

= --Apple-Mail-11--493846472--