Re: JDBC and arrays
От | Miroslav Šulc |
---|---|
Тема | Re: JDBC and arrays |
Дата | |
Msg-id | 45C4E1A6.3020401@startnet.cz обсуждение исходный текст |
Ответ на | Re: JDBC and arrays (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: JDBC and arrays
|
Список | 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.
В списке pgsql-jdbc по дате отправления: