Re: Detailed index predicate with \d on indexes in psql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Detailed index predicate with \d on indexes in psql
Date: 2001-11-13 17:55:43
Message-ID: 2567.1005674143@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Greg Sabino Mullane" <greg(at)turnstep(dot)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 of
SELECT pg_get_expr(i.indpred, i.indrelid) as indpred
FROM 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2001-11-13 17:57:04 Re: Open items
Previous Message Bruce Momjian 2001-11-13 17:50:41 Re: Open items