Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 916979FBE80 for ; Fri, 8 Jun 2007 12:46:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 65438-01 for ; Fri, 8 Jun 2007 12:46:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by postgresql.org (Postfix) with ESMTP id 7B8549FB8C2 for ; Fri, 8 Jun 2007 12:46:14 -0300 (ADT) Received: from a-kretschmer.de (p54B3B038.dip0.t-ipconnect.de [84.179.176.56]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id l58Fjt3R007592 for ; Fri, 8 Jun 2007 17:46:01 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 4.61) (envelope-from ) id 1Hwggr-0006gT-BS for pgsql-sql@postgresql.org; Fri, 08 Jun 2007 17:47:53 +0200 Date: Fri, 8 Jun 2007 17:47:53 +0200 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: show index from [table] Message-ID: <20070608154753.GA23791@KanotixBox> References: <112402456@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <112402456@web.de> X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.168 tagged_above=0 required=5 tests=AWL=0.032, BAYES_50=0.001, FORGED_RCVD_HELO=0.135 X-Spam-Level: X-Archive-Number: 200706/76 X-Sequence-Number: 28566 Stefan Zweig 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. Andreas -- 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°