Re: Determine if an index is a B-tree, GIST, or something else? - Mailing list pgsql-general

From Devrim GÜNDÜZ
Subject Re: Determine if an index is a B-tree, GIST, or something else?
Date
Msg-id 1358447065.2245.4.camel@lenovo01-laptop03.gunduz.org
Whole thread Raw
In response to Determine if an index is a B-tree, GIST, or something else?  (Paul Jungwirth <pj@illuminatedcomputing.com>)
List pgsql-general
Hi,

On Thu, 2013-01-17 at 10:03 -0800, Paul Jungwirth wrote:
> Is there any way to determine, by querying pg_index and other pg_* tables,
> whether an index was created as `USING something`? I've already got a big
> query joining pg_class, pg_index, etc. to pull out various attributes about
> the indexes in my database, and I'd like to include whether it's a GIST
> index, a B-Tree, or whatever was in the USING clause when the index was
> created.

You can either look at pg_indexes, or use pg_get_indexdef(oid) function,
where oid is index's oid.

Regards,
--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Community: devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org  Twitter: http://twitter.com/devrimgunduz

Attachment

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Combine Date and Time Columns to Timestamp
Next
From: aasat
Date:
Subject: Re: How to store clickmap points?