mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-09 08:10:09 +08:00
Fix pg_index statistics query to join proper relation.
This commit is contained in:
parent
f107174e8c
commit
a8a487df9f
@ -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 New Issue
Block a user