X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E08779DC814 for ; Mon, 16 Jan 2006 17:14:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 35015-07 for ; Mon, 16 Jan 2006 17:14:29 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 74ADE9DC875 for ; Mon, 16 Jan 2006 17:14:25 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k0GLEIIF018172; Mon, 16 Jan 2006 16:14:18 -0500 (EST) To: Oliver Jowett cc: Takeichi Kanzaki Cabrera , pgsql-jdbc@postgresql.org Subject: Re: reading an oidvector field error 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> Comments: In-reply-to Oliver Jowett message dated "Tue, 17 Jan 2006 10:05:42 +1300" Date: Mon, 16 Jan 2006 16:14:18 -0500 Message-ID: <18171.1137446058@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.089 required=5 tests=[AWL=0.089] X-Spam-Score: 0.089 X-Spam-Level: X-Archive-Number: 200601/74 X-Sequence-Number: 14525 Oliver Jowett 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