Query to retrieve the index columns when a function is used.

Поиск
Список
Период
Сортировка
От Sterpu Victor
Тема Query to retrieve the index columns when a function is used.
Дата
Msg-id em08be29fe-acfd-417d-99c5-1e98146b2922@victor-pc
обсуждение исходный текст
Ответы Re: Query to retrieve the index columns when a function is used.
Список 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 по дате отправления:

Предыдущее
От: Durumdara
Дата:
Сообщение: Who mades the inserts?
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Who mades the inserts?