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: 112402456@web.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
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
(b);

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,

stefan
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

Responses

Browse pgsql-sql by date

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