Query to retrieve the index columns when a function is used. - Mailing list pgsql-general

From Sterpu Victor
Subject Query to retrieve the index columns when a function is used.
Date
Msg-id em08be29fe-acfd-417d-99c5-1e98146b2922@victor-pc
Whole thread Raw
Responses Re: Query to retrieve the index columns when a function is used.
List pgsql-general
     Hello

I'm testing on Postgresql 12.1 and I have a index like this:
"check_dates_gist" EXCLUDE USING gist (id_test1 WITH =, id_test2 WITH =, tsrange(valid_from::timestamp without time zone, valid_to::timestamp without time zone) WITH &&)

When I run this query:
"select pc.relname, pi.indisunique, pi.indisprimary, array_agg(a.attname) as attname
FROM pg_class pc
JOIN pg_index pi ON pc.oid = pi.indexrelid AND pc.oid IN
(SELECT indexrelid FROM pg_index, pg_class WHERE pg_class.relname='test' AND pg_class.oid=pg_index.indrelid)
JOIN pg_attribute a ON a.attrelid = pc.oid
GROUP BY pc.relname,pi.indisunique, pi.indisprimary;"
I retrieve the index but there is no detail about the columns valid_from and valid_to.

How can I retrieve this detail?
Thank you.

Virus-free. www.avast.com

pgsql-general by date:

Previous
From: Durumdara
Date:
Subject: Who mades the inserts?
Next
From: Andreas Kretschmer
Date:
Subject: Re: Who mades the inserts?