Re: Enhanced index details using \d in psql - Mailing list pgsql-patches

From Tom Lane
Subject Re: Enhanced index details using \d in psql
Date
Msg-id 20791.1005327976@sss.pgh.pa.us
Whole thread Raw
In response to Re: Enhanced index details using \d in psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-patches
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> By the way, that "Index predicate" at the end of \di output
> is pretty ugly IMO. What is the purpose of it?

It looks like a dump of the internal form of the partial-index
predicate.  I don't know where it's coming from, but it's not
in current CVS sources.  Using your example I get just

regression=# \d apple
   Index "apple"
 Column  |  Type
---------+---------
 topping | integer
hash
Index predicate: (topping > 99)

regression=# \di apple
    List of relations
 Name  | Type  |  Owner
-------+-------+----------
 apple | index | postgres
(1 row)

regression=#

which reminds me that I've been misstating in this conversation;
the query that I was thinking about was "\d index" not "\di index".
\di is for a bulk listing of multiple indexes, one per line, so there's
a limit to how much info you can supply per index.  I doubt predicates
can be made to fit.  It might be worth adding a few columns though,
like name of parent table.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bill Studenmund
Date:
Subject: Re: Patch to add Heimdal kerberos support
Next
From: Liam Stewart
Date:
Subject: Re: [JDBC] absolute() error with jdbc7.1-1.2