Search Postgresql Archives

Re: extended index info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Fuhr <mike@xxxxxxxx> writes:
> On Fri, Mar 03, 2006 at 05:46:59PM +1100, Chris wrote:
>> If I look at an index:
>> It doesn't show me which fields it actually applies to, only the table. 

> \d news_pkey

Also, \d on the index's parent table will show you all the index
definitions.  This is more useful than the "\d index" display in some
cases, particularly non-default opclasses and index expressions.
For example:

regression=# create index fooi on tenk1((unique1+unique2));
CREATE INDEX
regression=# \d fooi
    Index "public.fooi"
     Column      |  Type
-----------------+---------
 pg_expression_1 | integer
btree, for table "public.tenk1"

regression=# \d tenk1
...
Indexes:
    "fooi" btree ((unique1 + unique2))
...

I'm not really sure why we don't account for these cases in "\d index",
unless that it's hard to see where to fit the info into a tabular
layout.

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux