pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kris Jurka <books@ejurka.com>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: Takeichi Kanzaki Cabrera <tkanzakic@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: reading an oidvector field error
Date: Mon, 16 Jan 2006 17:40:06 -0500
Message-ID: <18821.1137451206@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.BSO.4.61.0601161650430.8600@leary.csoft.net>
References: <651aa54b0601120629u5008e159y4af88edca5037a82@mail.gmail.com>
	<43C71C52.4020009@opencloud.com>
	<651aa54b0601130817s182aac6arf79d705b27a211c0@mail.gmail.com>
	<43C821C2.7090004@opencloud.com>
	<651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com>
	<43CC0AA6.605@opencloud.com>
	<18171.1137446058@sss.pgh.pa.us>
	<Pine.BSO.4.61.0601161650430.8600@leary.csoft.net>

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



view thread (8+ messages)  latest in thread

Message-ID: <18821.1137451206@sss.pgh.pa.us>
Permalink:  ../18821.1137451206@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18821.1137451206@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, books@ejurka.com, oliver@opencloud.com, tkanzakic@gmail.com
  Subject: Re: reading an oidvector field error
  In-Reply-To: <18821.1137451206@sss.pgh.pa.us>
  References: <651aa54b0601120629u5008e159y4af88edca5037a82@mail.gmail.com> <43C71C52.4020009@opencloud.com> <651aa54b0601130817s182aac6arf79d705b27a211c0@mail.gmail.com> <43C821C2.7090004@opencloud.com> <651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com> <43CC0AA6.605@opencloud.com> <18171.1137446058@sss.pgh.pa.us> <Pine.BSO.4.61.0601161650430.8600@leary.csoft.net> <18821.1137451206@sss.pgh.pa.us>

* 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