mirror of
https://github.com/postgres/postgres.git
synced 2026-02-14 08:13:27 -05:00
Fix pg_index statistics query to join proper relation.
This commit is contained in:
parent
f107174e8c
commit
a8a487df9f
2 changed files with 2 additions and 2 deletions
|
|
@ -2658,7 +2658,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
|||
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
|
||||
" AND (c.oid = x.indrelid) " +
|
||||
" AND (i.oid = x.indexrelid) " +
|
||||
" AND (c.relam = a.oid)) " +
|
||||
" AND (i.relam = a.oid)) " +
|
||||
"ORDER BY x.indisunique DESC, " +
|
||||
" x.indisclustered, a.amname, i.relname");
|
||||
while (r.next()) {
|
||||
|
|
|
|||
|
|
@ -2656,7 +2656,7 @@ public class DatabaseMetaData implements java.sql.DatabaseMetaData
|
|||
"WHERE ((c.relname = '" + tableName.toLowerCase() + "') " +
|
||||
" AND (c.oid = x.indrelid) " +
|
||||
" AND (i.oid = x.indexrelid) " +
|
||||
" AND (c.relam = a.oid)) " +
|
||||
" AND (i.relam = a.oid)) " +
|
||||
"ORDER BY x.indisunique DESC, " +
|
||||
" x.indisclustered, a.amname, i.relname");
|
||||
while (r.next()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue