DatabaseMetaData.getTables() doesn't sort its result

From: Jeroen van Vianen <jeroen(dot)van(dot)vianen(at)satama(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: DatabaseMetaData.getTables() doesn't sort its result
Date: 2001-03-07 13:30:27
Message-ID: 4.3.2.7.2.20010307142426.00aff828@ams010.satama.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

Here's an easy patch for todays snapshot to sort the result of the

public ResultSet getTables(String catalog, String schemaPattern, String
tableNamePattern, String[] types) throws SQLException

method:

Compare:
(<)J:\postgresql-snapshot\src\interfaces\jdbc\org\postgresql\jdbc2\DatabaseMetaData.java
(89441 bytes)
with:
(>)J:\postgresql-snapshot\src\interfaces\jdbc\org\postgresql\jdbc2\DatabaseMetaData.java.orig
(89415 bytes)

1669c1669
< sql.append("' order by relkind, relname");
---
> sql.append("'");

This is required by the JDBC spec: It says "They are ordered by TABLE_TYPE,
TABLE_SCHEM and TABLE_NAME."

<newbie>
I was wondering while looking through the code why outer joins are not used
for certain queries, e.g. in the getTables() method to get the comments for
a particular table.
</newbie>

Cheers,

Jeroen

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Joseph Shraibman 2001-03-08 04:08:59 Re: connection pooling in JDBC driver
Previous Message Peter Eisentraut 2001-03-06 20:23:25 Re: Re: [COMMITTERS] pgsql/ /aclocal.m4 /build.xml /configure /conf ...