Skip site navigation (1) Skip section navigation (2)

Re: patch - support for multi-dimensional arrays and NULL values

From: Marek Lewczuk <newsy(at)lewczuk(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org, books(at)ejurka(dot)com
Subject: Re: patch - support for multi-dimensional arrays and NULL values
Date: 2007-07-09 09:00:24
Message-ID: 4691F928.9010000@lewczuk.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Marek Lewczuk pisze:
> Hello Kris and hello group,
> in the attachment you can find AbstractJdbc2Array class with two fixed
> features: null value as element of an array and... multi-dimensional
> arrays support. There are two things related with this two changes:
> - all arrays are objects arrays (which means that e.g. boolean[] is
> represented as Boolean[])
> - when multi-dimensional array is processed then Object[] is returned by
> getArray() - it's because we can't declare in Java an array of unknown
> dimension (so if PostgreSQL returns char[][] then jdbc will return
> Object[], that contains String[] elements)
> 
> Sorry that I didn't send patch file, but I didn't have time to install
> cvs client (I'm using svn in everyday work).
> 
> In case of questions or any other discussion write me an email.
> 
> Best regards,
> Marek Lewczuk
Small correction to my previous post - I forgot to include null support 
when bulding final arrays. In the attachment corrected file.

Attachment: AbstractJdbc2Array.java
Description: text/plain (18.5 KB)

In response to

Responses

pgsql-jdbc by date

Next:From: Altaf MalikDate: 2007-07-09 11:58:27
Subject: Unable to prepare a statement when the object names contain more than one $ symbol
Previous:From: Dave CramerDate: 2007-07-08 21:11:15
Subject: Re: Connection is closed. Operation is not permitted. ------HELP....

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group