Re: Fix setArray() when using the v3 protocol (was Re: Postgres - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Fix setArray() when using the v3 protocol (was Re: Postgres
Date
Msg-id Pine.BSO.4.56.0410090103130.25387@leary.csoft.net
Whole thread Raw
In response to Fix setArray() when using the v3 protocol (was Re: Postgres 8.0 + JDBC)  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc

On Fri, 8 Oct 2004, Oliver Jowett wrote:

> Oliver Jowett wrote:
> > Oliver Jowett wrote:
> >
> >> It seems possible to fix the driver to handle this case by making
> >> setArray() derive a proper array type name i.e. ("_" +
> >> Array.getBaseType()), and using that rather than 'text' as the
> >> parameter type.
> >
> >

I've applied this.  It's not a great solution, but it's low impact and
does fix the problem.  An idea I had when looking at it is that if the
lookup by getBaseTypeName fails we could convert getBaseType to a pg type
name by the first match in the connection's jdbcXTypes and retry looking
for an array type with that.  Although considering our existing dependency
on Array.toString() returning a properly formatted array this seems like a
waste of effort.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: tightening up on use of oid 0
Next
From: Kris Jurka
Date:
Subject: Re: Using gettext