From: | Miroslav Šulc <miroslav(dot)sulc(at)startnet(dot)cz> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: JDBC and arrays |
Date: | 2007-02-03 19:25:26 |
Message-ID: | 45C4E1A6.3020401@startnet.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I got writing of inet[] working through object that implements PGobject
(you were right, it works only with _inet), but I cannot read inet[]. I
thought I'll get String[] through getArray(index).getArray() but instead
I get an exception on getArray(index). What is the correct way to read
inet[]?
Caused by: org.postgresql.util.PSQLException: Method
org.postgresql.jdbc3g.Jdbc3gArray.getArrayImpl(long,int,Map) is not
implemented.
at org.postgresql.Driver.notImplemented(Driver.java:728)
at
org.postgresql.jdbc2.AbstractJdbc2Array.getArrayImpl(AbstractJdbc2Array.java:228)
at
org.postgresql.jdbc2.AbstractJdbc2Array.getArray(AbstractJdbc2Array.java:71)
at
cz.startnet.utils.java.sql.ResultSetUtils.getValue(ResultSetUtils.java:253)
--
Miroslav Šulc
Kris Jurka napsal(a):
>
>
> On Fri, 2 Feb 2007, Miroslav Šulc wrote:
>
>> Thank you for explanation. If I still want to write inet[] data, is
>> it sufficient to implement PGobject so it returns 'inet[]' type and
>> '{ "ip", "ip" }' value and pass that to setObject()?
>
> That should work although you'll probably need to write _inet instead
> of inet[]. The underscore variant is the the backend's true datatype
> name and I'm not sure if it will accept the other version in this
> context.
From | Date | Subject | |
---|---|---|---|
Next Message | Miroslav Šulc | 2007-02-03 19:41:57 | Re: JDBC and arrays |
Previous Message | Barry Lind | 2007-02-03 17:09:06 | Re: PreparedStatements, LIKE and the % operator |