Fix for broken JDBC's getColumn() (take 2)

Started by Jeroen van Vianenalmost 25 years ago2 messagespatches
Jump to latest
#1Jeroen van Vianen
jeroen.van.vianen@satama.com

Hi,

What's the status of this patch I sent two weeks ago? I got no reply last
week for the same question.

My original mail can be found at
http://fts.postgresql.org/db/mw/msg.html?mid=1034457

Thanks,

Jeroen

Show quoted text

-----Original Message-----
From: Jeroen van Vianen [mailto:jeroen.van.vianen@satama.com]
Sent: Monday, September 10, 2001 20:01
To: pgsql-jdbc@postgresql.org; pgsql-patches@postgresql.org
Subject: [JDBC] Fix for broken JDBC's getColumn() (take 2)

Hi,

Per the recent discussion there's been some code changes in JDBC's
DatabaseMetaData.getColumn(). I proposed a patch that would
change the
number of queries to find out all columns in a table from 2 *
N + 1 to 1 (N
being the number of columns reported) by using some outer
joins. I also
fixed the fact that getColumns() only returned columns that
had a default
defined. OTOH, I did not use to change the code required for
obtaining a
column's remarks (by using col_description() for 7.2 and
requested by Tom
Lane).

Finally, I have found a way to get all the column details in
a single query
*and* use col_description() for 7.2 servers. A patch is attached. It
overrules Ren� Pijlman's fix for this that was committed just
today, but
still used N + 1 queries (sorry Ren� ;-) )

I also fixed the return values for TABLE_CAT and TABLE_SCHEM
from "" to
null, to be more standard compliant (and requested in Ren�'s
mail found at
http://fts.postgresql.org/db/mw/msg.html?mid=1034253).

As always, the JDBC1 version has not been tested as I have no JDK 1.1
available.

Please review,

Jeroen

#2Bruce Momjian
bruce@momjian.us
In reply to: Jeroen van Vianen (#1)
Re: Fix for broken JDBC's getColumn() (take 2)

OK, adding to queue.

Your patch has been added to the PostgreSQL unapplied patches list at:

http://candle.pha.pa.us/cgi-bin/pgpatches

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

Hi,

What's the status of this patch I sent two weeks ago? I got no reply last
week for the same question.

My original mail can be found at
http://fts.postgresql.org/db/mw/msg.html?mid=1034457

Thanks,

Jeroen

-----Original Message-----
From: Jeroen van Vianen [mailto:jeroen.van.vianen@satama.com]
Sent: Monday, September 10, 2001 20:01
To: pgsql-jdbc@postgresql.org; pgsql-patches@postgresql.org
Subject: [JDBC] Fix for broken JDBC's getColumn() (take 2)

Hi,

Per the recent discussion there's been some code changes in JDBC's
DatabaseMetaData.getColumn(). I proposed a patch that would
change the
number of queries to find out all columns in a table from 2 *
N + 1 to 1 (N
being the number of columns reported) by using some outer
joins. I also
fixed the fact that getColumns() only returned columns that
had a default
defined. OTOH, I did not use to change the code required for
obtaining a
column's remarks (by using col_description() for 7.2 and
requested by Tom
Lane).

Finally, I have found a way to get all the column details in
a single query
*and* use col_description() for 7.2 servers. A patch is attached. It
overrules Ren? Pijlman's fix for this that was committed just
today, but
still used N + 1 queries (sorry Ren? ;-) )

I also fixed the return values for TABLE_CAT and TABLE_SCHEM
from "" to
null, to be more standard compliant (and requested in Ren?'s
mail found at
http://fts.postgresql.org/db/mw/msg.html?mid=1034253).

As always, the JDBC1 version has not been tested as I have no JDK 1.1
available.

Please review,

Jeroen

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

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