Bidimensional Array - Mailing list pgsql-jdbc

From Leandro Guimarães
Subject Bidimensional Array
Date
Msg-id CAJV35FMHLeieh3zOwzMSvNqnppeEJe4v6fF8diiESVHswQEkzg@mail.gmail.com
Whole thread Raw
Responses Re: Bidimensional Array
List pgsql-jdbc
Hello Everyone,
  Please, could someone help me with the following problem?

  I need to get a bidimensional array from a postgresql function, everything is working fine with the driver version 8.2 bellow, put when i upgraded to 9.x the .getArray() method is not working anymore, i always have the message: No results were returned by the query.

  Following my code and my exception with the comments, please i'm crazy searching for a answer for this problem:

....

Array arr = rs.getArray(1); //checking the array, i'ts possible to see the elements "{"{319.1,811.2,915.5}"}"
ResultSet arrRS = arr.getResultSet();
while (arrRS.next()) {                    
     Array a1 = arrRS.getArray(2); //checking the array, i'ts possible to see the elements {319.1,811.2,915.5}                                         
     String[] str = (String[]) a1.getArray(); //HERE HAPPENS THE EXCEPTION

}

...

Following the exception

rg.postgresql.util.PSQLException: No results were returned by the query.
    at org.postgresql.jdbc2.TypeInfoCache.getPGArrayElement(TypeInfoCache.java:390)
    at org.postgresql.jdbc2.AbstractJdbc2Array.buildArray(AbstractJdbc2Array.java:323)
    at org.postgresql.jdbc2.AbstractJdbc2Array.getArrayImpl(AbstractJdbc2Array.java:149)
    at org.postgresql.jdbc2.AbstractJdbc2Array.getArray(AbstractJdbc2Array.java:115)


Thanks!
Leandro Guimarães


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Datasource portNumber property
Next
From: Kris Jurka
Date:
Subject: Re: Bidimensional Array