Обсуждение: index info v7.4

Поиск
Список
Период
Сортировка

index info v7.4

От
Martin Hampl
Дата:
Hi,

Is there a way to get information about the indexes I have defined on a
database?

Thanks,
Martin.


Re: index info v7.4

От
Oliver Elphick
Дата:
On Wed, 2003-11-19 at 17:18, Martin Hampl wrote:
> Hi,
>
> Is there a way to get information about the indexes I have defined on a
> database?

In psql, "\di" lists all indexes, "\d table name" lists indexes for that
table and shows the indexed columns.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "To show forth thy lovingkindness in the morning, and
      thy faithfulness every night."     Psalms 92:2


Re: index info v7.4

От
Martin Hampl
Дата:
Cool, thanks a lot.

Martin.

Am Mittwoch, 19.11.03, um 18:46 Uhr (Europe/Zurich) schrieb Oliver
Elphick:

> On Wed, 2003-11-19 at 17:18, Martin Hampl wrote:
>> Hi,
>>
>> Is there a way to get information about the indexes I have defined on
>> a
>> database?
>
> In psql, "\di" lists all indexes, "\d table name" lists indexes for
> that
> table and shows the indexed columns.
>
> --
> Oliver Elphick                                Oliver.Elphick@lfix.co.uk
> Isle of Wight, UK
> http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
>                  ========================================
>      "To show forth thy lovingkindness in the morning, and
>       thy faithfulness every night."     Psalms 92:2
>


Re: index info v7.4

От
Bruce Momjian
Дата:
Martin Hampl wrote:
> Hi,
>
> Is there a way to get information about the indexes I have defined on a
> database?

Uh, SELECT * FROM pg_index, and join that to pg_class.  You can do \di
too from psql.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073