From: Oliver Jowett <oliver@opencloud.com>
To: Takeichi Kanzaki Cabrera <tkanzakic@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: reading an oidvector field error
Date: Tue, 17 Jan 2006 10:05:42 +1300
Message-ID: <43CC0AA6.605@opencloud.com> (raw)
In-Reply-To: <651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com>
References: <651aa54b0601120629u5008e159y4af88edca5037a82@mail.gmail.com>
<43C71C52.4020009@opencloud.com>
<651aa54b0601130817s182aac6arf79d705b27a211c0@mail.gmail.com>
<43C821C2.7090004@opencloud.com>
<651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com>
Takeichi Kanzaki Cabrera wrote:
> Here is the exception and the stack trace that I get:
> org.postgresql.util.PSQLException: Method
> org.postgresql.jdbc3.Jdbc3Array.getArrayImpl(long,int,Map) is not yet
> implemented.
> at org.postgresql.Driver.notImplemented(Driver.java:580)
> at org.postgresql.jdbc2.AbstractJdbc2Array.getArrayImpl(AbstractJdbc2Array.java:232)
> at org.postgresql.jdbc2.AbstractJdbc2Array.getResultSetImpl(AbstractJdbc2Array.java:291)
> at org.postgresql.jdbc2.AbstractJdbc2Array.getResultSet(AbstractJdbc2Array.java:252)
> at pgObjects.PgDatabase.loadFunctionsFromDatabase(PgDatabase.java:893)
This stacktrace doesn't match the line in your code you claim throws an
exception. You originally said:
> Array argsList = rsFunc.getArray("field");
> ResultSet rsArgs = argsList.getResultSet();
> while (rsArgs.next()) {
> String s = rsArgs.getInt(2); //get an error here.
> PgDataType type = this.getDataType(s);
> args.add(type);
> }
but the code path your stacktrace shows is throwing an exception on
getResultSet().
Can you clarify what the code that actually causes the error is?
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:
>> default:
>> if (conn.getLogger().logDebug())
>> conn.getLogger().debug("getArrayImpl(long,int,Map) with "+getBaseTypeName());
>> throw org.postgresql.Driver.notImplemented(this.getClass(), "getArrayImpl(long,int,Map)");
(this should really throw a more informative exception..)
You could use getString() and parse the array representation yourself as
a workaround, or teach the driver's array code about oids.
-O
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: oliver@opencloud.com, tkanzakic@gmail.com
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>
* 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