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

show index from [table]

From: Stefan Zweig <stefanzweig1881(at)web(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: show index from [table]
Date: 2007-06-08 15:25:40
Message-ID: (view raw or whole thread)
Lists: pgsql-sql
hi list,

currently i am switching from mysql to pgsql, so i am a bit new to postgres' syntax.

at the moment i am looking in postgres for something which is similar to SHOW INDEX FROM [table] in mysql. unfortunately i could not find anything satisfying relating to this issue. 

i have found out, that there is the -di option with psql.

but actually i would need the information from within a (postgres) sql-query. is there a possibility to get information about the indices which have been created on a table?

if there is not, it might be sufficient for me to get the create index strings, such like you get, when viewing a table in pgAdmin:

-- Index: g_g114_b_idx

-- DROP INDEX g_g114_b_idx;

CREATE INDEX g_g114_b_idx
  ON g_g114
  USING btree

and parse them manually.

is that possible in any way?

maybe there is something similar to SHOW CREATE TABLE (as in MySQL) in postgresql.

thanks in advance,

SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen!


pgsql-sql by date

Next:From: Andrew SullivanDate: 2007-06-08 15:34:57
Subject: Re: the right time to vacuum database?
Previous:From: Charles.HouDate: 2007-06-08 15:20:36
Subject: Re: the right time to vacuum database?

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