pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Scott Cain <cain@cshl.edu>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: finding indexed functions from pg_index
Date: Tue, 20 Sep 2005 16:03:23 -0600
Message-ID: <20050920220323.GA66861@winnie.fuhr.org> (raw)
In-Reply-To: <Pine.GSO.4.05.10509201409020.23347-100000@phage.cshl.edu>
References: <Pine.GSO.4.05.10509201409020.23347-100000@phage.cshl.edu>

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.

http://www.postgresql.org/docs/8.0/interactive/functions-info.html

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



view thread (3+ messages)

Message-ID: <20050920220323.GA66861@winnie.fuhr.org>
Permalink:  ../20050920220323.GA66861@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050920220323.GA66861@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: mike@fuhr.org, cain@cshl.edu
  Subject: Re: finding indexed functions from pg_index
  In-Reply-To: <20050920220323.GA66861@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox