Re: How to find out if an index is unique?

From: "Rajesh Kumar Mallah(dot)" <mallah(at)trade-india(dot)com>
To: Dirk Lutzebaeck <lutzeb(at)aeccom(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: How to find out if an index is unique?
Date: 2002-07-17 15:10:28
Message-ID: 200207172040.28157.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

perhaps This is more elegant has Tom has indicated :

select pg_get_indexdef(oid) from pg_class where relname = 'email_bank_email';
pg_get_indexdef
-------------------------------------------------------------------------------
CREATE UNIQUE INDEX email_bank_email ON email_bank USING btree (lower(email))
(1 row)

substitue 'email_bank_email' with name of your index.....

regds
mallah.

On Wednesday 17 July 2002 15:36, Dirk Lutzebaeck wrote:
> Hello,
>
> is there a way to ask the system tables if a given index was created
> with the unique qualification? I don't want to insert data to try.
>
> Greetings,
>
> Dirk
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)

Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Nathan C. Burnett 2002-07-17 17:04:04 Re: [HACKERS] why is postgres estimating so badly?
Previous Message Masaru Sugawara 2002-07-17 13:28:37 Re: [HACKERS] please help on query