Thread: Array Support Fix

Array Support Fix

From
"Greg Zoller"
Date:
As noted by Barry, the Array ResultSet methods should use
an Encoding scheme.  Now they do.

The Array.java file can now hopefully be included in the
snapshot.

This latest patch is gzipped to avoid my mailer's annoying
word-wrap.  Unpack to src/interfaces/java/org/posgresql
and apply with: patch -p1 < patch.txt
Patch was created for the latest (as of 8/22/01) dev snapshot.

For this go-round I did not break formatting in ResultSet
into a separate utility class because the Timestamp code
needs access to a data member 'sbuf' that seems to be
present only in jdbc2.ResultSet.  Why is this, and can it
be standardized?  Either it shouldn't be a data member
(just create a new StringBuffer ever time like jdbc1.ResultSet)
or move this member up a level to org.postgresql.ResultSet
where a utility class can use it independently of JDBC version.
Long story short... didn't touch anything here for now.

Take care
Greg

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Attachment

Re: Array Support Fix

From
Bruce Momjian
Date:
Believe it or not, the gzip patch is corrupt:

    gzcat <patch
    gzcat: stdin: unexpected end of file

Also, the current CVS jdbc doesn't compile, and I wonder if this will
fix that.


> As noted by Barry, the Array ResultSet methods should use
> an Encoding scheme.  Now they do.
>
> The Array.java file can now hopefully be included in the
> snapshot.
>
> This latest patch is gzipped to avoid my mailer's annoying
> word-wrap.  Unpack to src/interfaces/java/org/posgresql
> and apply with: patch -p1 < patch.txt
> Patch was created for the latest (as of 8/22/01) dev snapshot.
>
> For this go-round I did not break formatting in ResultSet
> into a separate utility class because the Timestamp code
> needs access to a data member 'sbuf' that seems to be
> present only in jdbc2.ResultSet.  Why is this, and can it
> be standardized?  Either it shouldn't be a data member
> (just create a new StringBuffer ever time like jdbc1.ResultSet)
> or move this member up a level to org.postgresql.ResultSet
> where a utility class can use it independently of JDBC version.
> Long story short... didn't touch anything here for now.
>
> Take care
> Greg
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

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

Re: Array Support Fix

From
"Greg Zoller"
Date:
Here's a resend of the patch.gz.  I gunzip'ed it fine here
so it may be a transit problem.  Also removed the 'txt' suffix
in case that was confusing some transport layer trying to be
too inteligent for our own good.

This may have been because the Array.java class from the
previous patch didn't seem to have made it into the snapshot
build for some reason.  This patch should at least fix that issue.

Take care.
Greg

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

Attachment

Re: Array Support Fix

From
Bruce Momjian
Date:
> Here's a resend of the patch.gz.  I gunzip'ed it fine here
> so it may be a transit problem.  Also removed the 'txt' suffix
> in case that was confusing some transport layer trying to be
> too inteligent for our own good.
>
> This may have been because the Array.java class from the
> previous patch didn't seem to have made it into the snapshot
> build for some reason.  This patch should at least fix that issue.

I added that file this morning.  Sorry I missed adding it to CVS the
first time.  Adding it didn't fix the compile.

I am still getting a jdbc compile error:

    [javac] Compiling 5 source files to
/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/interfaces/jdbc/build
    [javac]
/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/interfaces/jdbc/org/postgresql/V3/jdbc2/Array.java:26:
Class org.postgresql.jdbc2.Array already defined in
/usr/var/local/src/gen/pgsql/CURRENT/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java.
    [javac] public class Array implements java.sql.Array
    [javac]              ^
    [javac] 1 error

BUILD FAILED

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