Re: reading an oidvector field error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Oliver Jowett <oliver(at)opencloud(dot)com>, 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 22:40:06
Message-ID: 18821.1137451206@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Kris Jurka <books(at)ejurka(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Prasanth 2006-01-17 15:51:30 Re: getDate after call to updateDate
Previous Message Oliver Jowett 2006-01-16 22:36:54 Re: getDate after call to updateDate