Re: Postgres 8.0 + JDBC - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Postgres 8.0 + JDBC
Date
Msg-id 41630AAB.7080501@opencloud.com
Whole thread Raw
In response to Re: Postgres 8.0 + JDBC  (Kris Jurka <books@ejurka.com>)
Responses Re: Postgres 8.0 + JDBC
List pgsql-jdbc
Kris Jurka wrote:
>
> On Wed, 6 Oct 2004, 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.
>>
>
>
> Wouldn't it be simpler to change setArray to call setString with 0 as the
> type oid allowing the backend to figure out what to do with it?  Perhaps
> it would have trouble determining the type if the underlying function was
> overloaded, but other than that I don't see a problem.

Using the unknown oid seems like it'd introduce more problems:
overloading, and the possibility you actually pass your array as some
other type unexpectedly.

I am wondering if the right way to find the array OID is to prepend "_"
and search on pg_type.typname, or to look for pg_type.typinput = (oid of
array_in) and pg_type.typelem = (oid of underlying type). Is there a
'standard' way of finding an array type OID?

-O

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: correct installation of postgis ??
Next
From: Tom Lane
Date:
Subject: Re: Postgres 8.0 + JDBC