Index metadata not sorted by ORDINAL_POSITION

Поиск
Список
Период
Сортировка
Искать

Index metadata not sorted by ORDINAL_POSITION

От:
Peter Royal <proyal@pace2020.com>
Дата:
Wasn't sure if this made it through the first time...
-pete

Begin forwarded message:

> From: Peter Royal 
> Date: Tue Apr 8, 2003  6:13:22  PM US/Eastern
> To: pgsql-jdbc@postgresql.org
> Subject: Index metadata not sorted by ORDINAL_POSITION
>
> In AbstractJdbc1DatabaseMetaData.getIndexInfo(), the query needs to 
> also be sorted by ORDINAL_POSITION as the final field in the ORDER BY 
> clause.
> -pete
>

Re: Index metadata not sorted by ORDINAL_POSITION

От:
Kris Jurka <books@ejurka.com>
Дата:
Вложения:

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

Re: Index metadata not sorted by ORDINAL_POSITION

От:
Barry Lind <blind@xythos.com>
Дата:
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

FAQ