Commit a8a487df authored by Bruce Momjian's avatar Bruce Momjian

Fix pg_index statistics query to join proper relation.

parent f107174e
......@@ -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()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment