pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Kris Jurka <books@ejurka.com>
Cc: Johann Robette <jrobette@onyme.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Postgres 8.0 + JDBC
Date: Wed, 06 Oct 2004 09:57:15 +1300
Message-ID: <41630AAB.7080501@opencloud.com> (raw)
In-Reply-To: <Pine.BSO.4.56.0410051527310.11868@leary.csoft.net>
References: <002901c4aaf7$feabc310$a5010a0a@Johann>
	<4162FFC9.3010808@opencloud.com>
	<Pine.BSO.4.56.0410051527310.11868@leary.csoft.net>

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



view thread (6+ messages)  latest in thread

Message-ID: <41630AAB.7080501@opencloud.com>
Permalink:  ../41630AAB.7080501@opencloud.com/
Also on:    postgresql.org/message-id/41630AAB.7080501@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, books@ejurka.com, jrobette@onyme.com
  Subject: Re: Postgres 8.0 + JDBC
  In-Reply-To: <41630AAB.7080501@opencloud.com>
  References: <002901c4aaf7$feabc310$a5010a0a@Johann> <4162FFC9.3010808@opencloud.com> <Pine.BSO.4.56.0410051527310.11868@leary.csoft.net> <41630AAB.7080501@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox