Question about ResultSetMetaData

Lists: pgsql-jdbc
From: "Robert Landsmeer" <r(dot)landsmeer(at)wis(dot)nl>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Question about ResultSetMetaData
Date: 2006-04-21 07:59:36
Message-ID: 50CA25BD6EEA954FA592C097399942E30E463D65@CM1.wis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

Hello all,

In the application i am developing we query the ResultSetMetaData for
all columns in a particular table to discover the type and null-ability
of the column.

On the todolist I found the following under the idea's section:

ResultSetMetaData calls that run queries are cached on a per column
basis, but it seems likely that they're going to be called for all
columns, so try to issue one query per ResultSet, not per column.

Does anyone know if this will make it into a release someday? As it
would really help us performance wise.

Thanks in advance,

Robert


From: Kris Jurka <books(at)ejurka(dot)com>
To: Robert Landsmeer <r(dot)landsmeer(at)wis(dot)nl>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Question about ResultSetMetaData
Date: 2006-04-21 20:14:09
Message-ID: Pine.BSO.4.63.0604211511160.1040@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-jdbc

On Fri, 21 Apr 2006, Robert Landsmeer wrote:

> In the application i am developing we query the ResultSetMetaData for
> all columns in a particular table to discover the type and null-ability
> of the column.

If this is all from one table, perhaps you would be better off using a
DatabaseMetaData.getColumns instead? That should only issue one query.

> On the todolist I found the following under the idea's section:
>
> ResultSetMetaData calls that run queries are cached on a per column
> basis, but it seems likely that they're going to be called for all
> columns, so try to issue one query per ResultSet, not per column.
>
> Does anyone know if this will make it into a release someday? As it
> would really help us performance wise.
>

At this point it is just an idea. No one that I know of is working on it.

Kris Jurka