Re: Getting info on index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Francisco Reyes <lists(at)natserv(dot)com>
Cc: Pgsql Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Getting info on index
Date: 2001-11-07 05:15:21
Message-ID: 3559.1005110121@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Francisco Reyes <lists(at)natserv(dot)com> writes:
> What, if anything, would show me the complete key of an index?

You could use pg_get_indexdef, which is what pg_dump uses:

regression=# select pg_get_indexdef((select oid from pg_class where relname = 'fooi'));
pg_get_indexdef
--------------------------------------------------
CREATE INDEX fooi ON foo USING btree (lower(f1))
(1 row)

There's been some talk of improving psql's \d facility to make use of
this itself, but it's probably too late to do it for 7.2 ...

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message calios 2001-11-07 05:16:43
Previous Message Francisco Reyes 2001-11-07 03:52:45 Getting info on index