Re: Index metadata not sorted by ORDINAL_POSITION - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: Index metadata not sorted by ORDINAL_POSITION
Date
Msg-id 3E9E2FC1.6060405@xythos.com
Whole thread Raw
In response to Re: Index metadata not sorted by ORDINAL_POSITION  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Patch applied to both head and 7.3 branch.

thanks,
--Barry


Kris Jurka wrote:
> On Mon, 14 Apr 2003, Peter Royal wrote:
>
>>>In AbstractJdbc1DatabaseMetaData.getIndexInfo(), the query needs to
>>>also be sorted by ORDINAL_POSITION as the final field in the ORDER BY
>>>clause.
>
>
> Attached is a patch to fix this problem.
>
> Kris Jurka
>
>
>
> ------------------------------------------------------------------------
>
> ? src/interfaces/jdbc/org/postgresql/jdbc1/t.java
> Index: src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
> ===================================================================
> RCS file:
/projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java,v
> retrieving revision 1.20
> diff -c -r1.20 AbstractJdbc1DatabaseMetaData.java
> *** src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java    2003/03/25 02:28:45    1.20
> --- src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java    2003/04/16 07:15:31
> ***************
> *** 3568,3574 ****
>           if (unique) {
>               sql += " AND i.indisunique ";
>           }
> !         sql += " ORDER BY NON_UNIQUE, TYPE, INDEX_NAME ";
>           return connection.createStatement().executeQuery(sql);
>       }
>
> --- 3568,3574 ----
>           if (unique) {
>               sql += " AND i.indisunique ";
>           }
> !         sql += " ORDER BY NON_UNIQUE, TYPE, INDEX_NAME, ORDINAL_POSITION ";
>           return connection.createStatement().executeQuery(sql);
>       }
>
>
>
> ------------------------------------------------------------------------
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html


pgsql-jdbc by date:

Previous
From: Barry Lind
Date:
Subject: Re: Bug in getImportedExportedKeys(), DatabaseMetaData class
Next
From: Nic Ferrier
Date:
Subject: Re: [PATCHES] the build