You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, There is (IMO) a2 wrong joins in second block.
should be
JOIN btree_index_atts AS ind_atts ON pg_attribute.attrelid = ind_atts.indrelid AND pg_attribute.attnum = ind_atts.attnum
instead of
JOIN btree_index_atts AS ind_atts ON pg_attribute.attrelid = ind_atts.indexrelid AND pg_attribute.attnum = ind_atts.attnum
the following join, Is aso wrong. I use:
LEFT JOIN pg_stats ON pg_stats.schemaname = ind_atts.nspname
-- stats for regular index columns
AND ( (pg_stats.tablename = ind_atts.tablename AND pg_catalog.pg_get_indexdef(ind_atts.indexrelid, pg_attribute.attnum, TRUE) ~ pg_stats.attname)
-- stats for functional indexes
OR (pg_stats.tablename = ind_atts.index_name AND pg_stats.attname = pg_attribute.attname))
The text was updated successfully, but these errors were encountered:
Hi, There is (IMO) a2 wrong joins in second block.
should be
JOIN btree_index_atts AS ind_atts ON pg_attribute.attrelid = ind_atts.indrelid AND pg_attribute.attnum = ind_atts.attnum
instead of
JOIN btree_index_atts AS ind_atts ON pg_attribute.attrelid = ind_atts.indexrelid AND pg_attribute.attnum = ind_atts.attnum
the following join, Is aso wrong. I use:
LEFT JOIN pg_stats ON pg_stats.schemaname = ind_atts.nspname
-- stats for regular index columns
AND ( (pg_stats.tablename = ind_atts.tablename AND pg_catalog.pg_get_indexdef(ind_atts.indexrelid, pg_attribute.attnum, TRUE) ~ pg_stats.attname)
-- stats for functional indexes
OR (pg_stats.tablename = ind_atts.index_name AND pg_stats.attname = pg_attribute.attname))
The text was updated successfully, but these errors were encountered: