Re: reading an oidvector field error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Takeichi Kanzaki Cabrera <tkanzakic(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: reading an oidvector field error
Date: 2006-01-16 21:14:18
Message-ID: 18171.1137446058@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Oliver Jowett <oliver(at)opencloud(dot)com> writes:
> However the most likely cause is that the array code just does not
> understand the OID type -- there is this code in getArrayImpl when an
> unsupported array element type is encountered:

Another problem is that oidvector is not the same as oid[] --- for what
are now entirely historical reasons, they have different external
representations, which is certainly going to confuse any client-side
code trying to parse the data. You'd really need some single-purpose
code in the driver to handle oidvector at all.

In very recent PG releases, you could cast oidvector to oid[] (or maybe
better int8[]) in your query, but unless the JDBC array code copes with
nondefault subscripts, it'll still have trouble:

regression=# select '1 2 3'::oidvector::int8[];
int8
---------------
[0:2]={1,2,3}
(1 row)

regression=#

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2006-01-16 21:54:53 Re: reading an oidvector field error
Previous Message Oliver Jowett 2006-01-16 21:05:42 Re: reading an oidvector field error