"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