pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefan Zweig <stefanzweig1881@web.de>
To: pgsql-sql@postgresql.org
Subject: show index from [table]
Date: Fri, 08 Jun 2007 17:25:40 +0200
Message-ID: <112402456@web.de> (raw)

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




view thread (4+ messages)  latest in thread

Message-ID: <112402456@web.de>
Permalink:  ../112402456@web.de/
Also on:    postgresql.org/message-id/112402456@web.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: stefanzweig1881@web.de
  Subject: Re: show index from [table]
  In-Reply-To: <112402456@web.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox