Re: Detailed index predicate with \d on indexes in psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Detailed index predicate with \d on indexes in psql
Date
Msg-id 2567.1005674143@sss.pgh.pa.us
Whole thread Raw
In response to Detailed index predicate with \d on indexes in psql  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-hackers
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> Anyone know why I am getting the "internal form" of the 
> partial-index predicate?

If you look in describe.c, you'll see that what psql is printing is
the result ofSELECT pg_get_expr(i.indpred, i.indrelid) as indpredFROM pg_index i
which should yield the exact same text as what pg_get_indexdef offers
in WHERE.  Have you mucked with this SELECT?  Are you perhaps trying
to run against a pre-7.2 server (pg_get_expr is new in 7.2)?

> I'm also wondering if we even need the "Index predicate:" 
> section at all?

Not if you intend to print the results of pg_get_indexdef instead.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: fts.postgresql.org problem ! still no routing
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Open items