Re: Query to retrieve the index columns when a function is used.
В списке pgsql-general по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Query to retrieve the index columns when a function is used. |
| Дата | |
| Msg-id | 5284.1583965740@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Query to retrieve the index columns when a function is used. (David Rowley <dgrowleyml@gmail.com>) |
| Список | pgsql-general |
David Rowley <dgrowleyml@gmail.com> writes:
> On Tue, 10 Mar 2020 at 02:16, Sterpu Victor <victor@caido.ro> wrote:
>> How can I retrieve this detail?
> Those details are in the indexprs column. There's an item there for
> each 0 valued indkey. It's not going to be particularly easy for you
> to parse that from SQL. Internally in PostgreSQL, we have functions
> that could give you that information easily, but to access those from
> SQL you'd need to write something in C.
You could use pg_get_indexdef(). I agree that parsing indexprs from
SQL is not to be recommended --- aside from being very complex, it
would break on a regular basis, because we change those structs often.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера