Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a8a487d

Browse files
committed
Fix pg_index statistics query to join proper relation.
1 parent f107174 commit a8a487d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/interfaces/jdbc/org/postgresql/jdbc1/DatabaseMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2658,7 +2658,7 @@ public java.sql.ResultSet getIndexInfo(String catalog, String schema, String tab
26582658
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
26592659
" AND (c.oid = x.indrelid) " +
26602660
" AND (i.oid = x.indexrelid) " +
2661-
" AND (c.relam = a.oid)) " +
2661+
" AND (i.relam = a.oid)) " +
26622662
"ORDER BY x.indisunique DESC, " +
26632663
" x.indisclustered, a.amname, i.relname");
26642664
while (r.next()) {

src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,7 @@ public java.sql.ResultSet getIndexInfo(String catalog, String schema, String tab
26562656
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
26572657
" AND (c.oid = x.indrelid) " +
26582658
" AND (i.oid = x.indexrelid) " +
2659-
" AND (c.relam = a.oid)) " +
2659+
" AND (i.relam = a.oid)) " +
26602660
"ORDER BY x.indisunique DESC, " +
26612661
" x.indisclustered, a.amname, i.relname");
26622662
while (r.next()) {

0 commit comments

Comments
 (0)