Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux