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 072209DC814 for ; Mon, 16 Jan 2006 17:06:03 -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 32488-10 for ; Mon, 16 Jan 2006 17:06:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 4D7509DC846 for ; Mon, 16 Jan 2006 17:05:56 -0400 (AST) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EybY2-0001BN-Kv; Tue, 17 Jan 2006 10:05:55 +1300 Message-ID: <43CC0AA6.605@opencloud.com> Date: Tue, 17 Jan 2006 10:05:42 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051009) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Takeichi Kanzaki Cabrera CC: pgsql-jdbc@postgresql.org Subject: Re: reading an oidvector field error References: <651aa54b0601120629u5008e159y4af88edca5037a82@mail.gmail.com> <43C71C52.4020009@opencloud.com> <651aa54b0601130817s182aac6arf79d705b27a211c0@mail.gmail.com> <43C821C2.7090004@opencloud.com> <651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com> In-Reply-To: <651aa54b0601161006l12f76af3w686f4f3c0fc70137@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.11 required=5 tests=[AWL=0.110] X-Spam-Score: 0.11 X-Spam-Level: X-Archive-Number: 200601/73 X-Sequence-Number: 14524 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