finding indexed functions from pg_index - Mailing list pgsql-interfaces

From Scott Cain
Subject finding indexed functions from pg_index
Date
Msg-id Pine.GSO.4.05.10509201409020.23347-100000@phage.cshl.edu
Whole thread Raw
Responses Re: finding indexed functions from pg_index  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: finding indexed functions from pg_index  (Michael Fuhr <mike@fuhr.org>)
List pgsql-interfaces
Hi,

I am trying to modify SQL::Translator, a perl module for translating
various dialects of SQL ddl (table, index creates, constraints, etc) (and 
it does other cool things too, check it out!), to talk directly to a
PostgreSQL database to determine what tables it has, what columns they
have, indexes, constraints, etc.  I have mostly figured out what I need
from pg_namespace, pg_class, pg_index and pg_attribute.

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.  Is that represented somewhere
in another system table?

Thanks,
Scott


----------------------------------------------------------------------
Scott Cain, Ph. D.                      cain@cshl.org
GMOD Coordinator, http://www.gmod.org/             (216)392-3087
----------------------------------------------------------------------




pgsql-interfaces by date:

Previous
From: Mark Richardson
Date:
Subject: Re: libpq, ecpg and the bytea data type
Next
From: Tom Lane
Date:
Subject: Re: finding indexed functions from pg_index