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

From Tom Lane
Subject Re: reading an oidvector field error
Date
Msg-id 18821.1137451206@sss.pgh.pa.us
Whole thread Raw
In response to Re: reading an oidvector field error  (Kris Jurka <books@ejurka.com>)
Responses Re: reading an oidvector field error
List pgsql-jdbc
Kris Jurka <books@ejurka.com> writes:
> On Mon, 16 Jan 2006, Tom Lane wrote:
>> 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:

> The JDBC array code throws away nondefault subscripts because the JDBC
> spec says that all arrays are 1-indexed.

OK, so casting to int8[] in the query should be a usable workaround.
(You want int8 not int4 because OIDs are unsigned and won't necessarily
fit in an int4.)

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: getDate after call to updateDate
Next
From: Takeichi Kanzaki Cabrera
Date:
Subject: Re: reading an oidvector field error