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

Re: JDBC Array Support, Take III

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Greg Zoller <gzoller(at)hotmail(dot)com>
Cc: barry(at)xythos(dot)com, pgsql-patches(at)postgresql(dot)org
Subject: Re: JDBC Array Support, Take III
Date: 2001-08-16 13:29:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbcpgsql-patches
Your patch has been added to the PostgreSQL unapplied patches list at:

I will try to apply it within the next 48 hours.

> Greetings again.
> Thanks for your feedback (and patience).  Enclosed is my third
> attempt at a patch to 7.1.2 to support Array.
> [I think I've solved the mangled patch problem.  Hotmail seems to
> try to format the text file, so gzipping it should solve this
> problem.]
> In this patch I've incorporated Barry's feedback.  Specifically:
> 1)  OIDs are no longer hard-coded into  In order to
>     support this change I added a getOID(String) method to
>     which receives a PostgreSQL field type and returns a value from
>     java.sql.Types.  I couldn't get away from using OIDs altogether
>     because the JDBC spec for Array specifies that some methods return
>     a ResultSet.  This requires I construct Field objects,
>     which means I need OIDs.  At least this approach doesn't hard
>     code these values.  A Hashtable cache has been added to Field
>     so that an SQL lookup isn't necessary (following the model already
>     in
> 2)  Rewired the base formatting code in to use 'to'
>     methods, which are then exposed as static methods in ResultSet.
>     These methods are used in Array to format the data without
>     duplications in the code.
> 3)  Artifact call to first() in ResultSet.getArray() removed.
> Patching as before: (gunzip first this time)
> >cd <PGSQL_SRC_PATH>/src/interfaces/jdbc/org/postgresql
> >patch -p1 < $PATH_TO_PATCH/patch
> >make
> Let me know if I'm getting closer to something useful.
> Take care.
> Greg
> _________________________________________________________________
> Get your FREE download of MSN Explorer at

[ Attachment, skipping... ]

> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

  Bruce Momjian                        |
  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

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-08-16 13:29:39
Subject: Re: Patch for JDBC to update some comments
Previous:From: Barry LindDate: 2001-08-16 05:46:07
Subject: Patch for JDBC to update some comments

pgsql-jdbc by date

Next:From: Ben CarteretteDate: 2001-08-16 15:02:27
Subject: Re: select on multiple tables
Previous:From: Arnaud ESPANELDate: 2001-08-16 09:48:05
Subject: Re: Postgresql 7.1.2 and StarOffice 5.2

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