Re: Re: [PATCHES] JDBC2 Array Patch (New feature)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rene Pijlman <rpijlman(at)wanadoo(dot)nl>
Cc: Greg Zoller <gzoller(at)hotmail(dot)com>, pgsql-patches(at)postgresql(dot)org, PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Re: [PATCHES] JDBC2 Array Patch (New feature)
Date: 2001-08-08 20:53:13
Message-ID: 200108082053.f78KrEr16383@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-patches


Patch rejected, and hopefully resubmitted.

> On Wed, 8 Aug 2001 11:19:32 -0400 (EDT), Greg Zoller wrote:
> >> Specifically you can now use the ResultSet.getArray() method
> >> to return an java.sql.Array object. Its a really convenient
> >> way to load up a Java array with one columns' worth of results.
>
> I don't think this patch is a correct implementation of the JDBC
> spec. I've mailed this to Greg:
>
> R>Isn't ResultSet.getArray() supposed to fetch *one* value
> R>(the value of one column in one row) and interpret that as
> R>a structured value of an SQL array field
> R>(http://www.postgresql.org/users-lounge/docs/7.1/postgres/arrays.html)?
> R>It looks like your code is looping through the ResultSet
> R>and gathering data from multiple rows.
>
> And received this reply:
>
> G>You know what... I may have misinterpreted the JDBC spec!
> G>My original understanding was that getArray was supposed to
> G>iterate through a ResultSet and load up a Java array with
> G>the contents of a given field (i.e. column). But now as
> G>I re-read the specification it does actually mean the
> G>interpretation you gave (load a single field of type array
> G>into a Java array object).
> G>
> G>So it seems that my implementation of Array is based on a
> G>misunderstanding. :-(
> G>
> G>Massive bummer. Please disregard my patch.
>
> Greg, I do hope you continue your efforts! Not bad for a first
> patch anyway, mine was only 2 lines. We still need Array support
> badly... (hint, hint) :-)
>
> Regards,
> Ren? Pijlman
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rene Pijlman 2001-08-08 21:55:33 Re: Re: JDBC 2.0 conformance, documentation and todo list
Previous Message Bruce Momjian 2001-08-08 20:50:48 Re: [PATCHES] JDBC2 Array Patch (New feature)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2001-08-08 21:49:41 Re: contrib/postgis spatial extensions
Previous Message Bruce Momjian 2001-08-08 20:50:48 Re: [PATCHES] JDBC2 Array Patch (New feature)