Skip site navigation (1) Skip section navigation (2)

Re: finding indexed functions from pg_index

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Scott Cain <cain(at)cshl(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: finding indexed functions from pg_index
Date: 2005-09-20 22:03:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Tue, Sep 20, 2005 at 02:15:36PM -0400, Scott Cain wrote:
> What I haven't figure out is this: how does one determine what the
> declarative statement is for a functional index that is obtained from
> pg_index.indexprs?  What I would like to be able to do is be able to
> recreate the SQL that defined that index.

See the pg_get_indexdef() function.

When trying to figure out how to query the system catalogs, it can
be useful to study the queries that psql runs for \d commands.  Run
"psql -E" or execute "\set ECHO_HIDDEN" to see those queries.

Michael Fuhr

In response to

pgsql-interfaces by date

Next:From: Robert WimmerDate: 2005-09-21 23:43:23
Subject: check foreign constraints before delete
Previous:From: Tom LaneDate: 2005-09-20 21:54:45
Subject: Re: finding indexed functions from pg_index

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group