Re: How can I know whether an index already exists

From: John R Pierce <pierce(at)hogranch(dot)com>
To: "kaifeng(dot)zhu" <cafeeee(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I know whether an index already exists
Date: 2010-06-23 06:32:19
Message-ID: 4C21AA73.6090403@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 06/22/10 11:16 PM, kaifeng.zhu wrote:
> Hi there,
> How can I know whether an index already exists?
> I have googled for hours and cannot found the solution...
>

query this table,

http://www.postgresql.org/docs/current/static/catalog-pg-class.html

possibly joined with...

http://www.postgresql.org/docs/current/static/catalog-pg-index.html

or query this view,
http://www.postgresql.org/docs/current/static/view-pg-indexes.html

those are all in the pg_catalog schema, which is shared by all databases

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ravi Katkar 2010-06-23 06:56:57 disable password prompt - command line
Previous Message Sergey Konoplev 2010-06-23 06:21:54 Re: How can I know whether an index already exists