Re: Query to retrieve all indexed columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query to retrieve all indexed columns
Дата
Msg-id 8307.1227119066@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query to retrieve all indexed columns  ("Bart van Houdt" <bart.van.houdt@syfact.com>)
Список pgsql-sql
"Bart van Houdt" <bart.van.houdt@syfact.com> writes:
> I am working on a query to retrieve all indexed columns and came up with
> the following query:
> ...
> Tis query works for single column indexes, but with multiple column
> indexes I get incorrect results... I'm having a hard time figuring out
> how to join pg_attribute.indkey in this, could anyone help me out on
> this one?  

Look at the information_schema views.  You might find that one of them
already solves your problem ... and even if not, they will provide
examples of how to deconstruct the catalog information.
share/information_schema.sql in an installed PG file set is the
most convenient thing to study.
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: VACUUM cannot be executed from multi-command string
Следующее
От: novice
Дата:
Сообщение: date range query help