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

Re: show index from [table]

From: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: show index from [table]
Date: 2007-06-08 15:47:53
Message-ID: 20070608154753.GA23791@KanotixBox (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Stefan Zweig <stefanzweig1881(at)web(dot)de> schrieb:

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

You are welcome.

> 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.

Yes, right.

> 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?

Yes, of corse. Please start psql with the -E - option. Now you can see
the underlying sql-statement for commands like \di.

Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°

In response to


pgsql-sql by date

Next:From: Ireneusz PlutaDate: 2007-06-08 19:13:59
Subject: Re: show index from [table]
Previous:From: Andrew SullivanDate: 2007-06-08 15:34:57
Subject: Re: the right time to vacuum database?

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