From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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 16:14:18 -0500
Message-ID: <18171.1137446058@sss.pgh.pa.us> (raw)
In-Reply-To: <43CC0AA6.605@opencloud.com>
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>
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
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, oliver@opencloud.com, tkanzakic@gmail.com
Subject: Re: reading an oidvector field error
In-Reply-To: <18171.1137446058@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>
* 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