Re: reading an oidvector field error - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: reading an oidvector field error
Date
Msg-id 18171.1137446058@sss.pgh.pa.us
Whole thread Raw
In response to Re: reading an oidvector field error  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: reading an oidvector field error
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: reading an oidvector field error
Next
From: Kris Jurka
Date:
Subject: Re: reading an oidvector field error