Re: Postgres 8.0 + JDBC

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Johann Robette <jrobette(at)onyme(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Postgres 8.0 + JDBC
Date: 2004-10-05 20:57:15
Message-ID: 41630AAB.7080501@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Nolan 2004-10-05 21:07:35 Re: SSL connection between PHP4 & PostgreSQL ???
Previous Message Kris Jurka 2004-10-05 20:31:39 Re: Postgres 8.0 + JDBC

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2004-10-05 21:28:12 Re: Postgres 8.0 + JDBC
Previous Message Kris Jurka 2004-10-05 20:42:10 Re: correct installation of postgis ??