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

finding indexed functions from pg_index

From: Scott Cain <cain(at)cshl(dot)edu>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: finding indexed functions from pg_index
Date: 2005-09-20 18:15:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces

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?


Scott Cain, Ph. D.				 	 cain(at)cshl(dot)org
GMOD Coordinator,			 (216)392-3087


pgsql-interfaces by date

Next:From: Tom LaneDate: 2005-09-20 21:54:45
Subject: Re: finding indexed functions from pg_index
Previous:From: Greg Sabino MullaneDate: 2005-09-16 01:47:19
Subject: Re: Beta of DBD::Pg 1.44 available

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