Re: patch - support for multi-dimensional arrays and NULL values - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: patch - support for multi-dimensional arrays and NULL values
Date
Msg-id 469B0F0F.2070700@opencloud.com
Whole thread Raw
In response to Re: patch - support for multi-dimensional arrays and NULL values  (Kris Jurka <books@ejurka.com>)
Responses Re: patch - support for multi-dimensional arrays and NULL values  (Marek Lewczuk <newsy@lewczuk.com>)
List pgsql-jdbc
Kris Jurka wrote:

> 2) Changing from returning arrays of primitive types to arrays of
> objects is necessary for null and multi-dimension support, but will
> still break users code all over the place.  Not sure what we can do
> about that other than put a strong warning in the release notes.

I was wondering which behaviour was right -- I thought returning
array-of-primitive was correct per the spec at the time I wrote it, and
that's why getArray() returns Object not Object[] -- but now the 1.6
javadoc says:

> Note: When getArray is used to materialize a base type that maps to a primitive data type, then it is
implementation-definedwhether the array returned is an array of that primitive data type or an array of Object. 

So I suppose that .. in theory .. applications should be expecting to
handle both. Ugh.

-O

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: robust handling of initial connection with net interfaces down
Next
From: Marek Lewczuk
Date:
Subject: Re: patch - support for multi-dimensional arrays and NULL values