On Saturday, February 28, 2026, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>
> draft=# WITH idx AS( SELECT i.indexrelid, i.indrelid, i.indnkeyatts,
> i.indkey::int2[] AS indkey FROM pg_index i, pg_class ic, pg_namespace
> ns
> WHERE ic.oid = i.indexrelid AND ns.oid = ic.relnamespace AND
> ns.nspname = 'public' AND ic.relname = 'leagues_new' )
>
I doubt your index name is leagues_new. That is probably the table name.
But ic.relname contains index names.
David J.