Re: How to find out if an index is unique? - Mailing list pgsql-sql

From Rajesh Kumar Mallah.
Subject Re: How to find out if an index is unique?
Date
Msg-id 200207172040.28157.mallah@trade-india.com
Whole thread Raw
In response to How to find out if an index is unique?  (Dirk Lutzebaeck <lutzeb@aeccom.com>)
List 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_bankUSING 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.




pgsql-sql by date:

Previous
From: Masaru Sugawara
Date:
Subject: Re: [HACKERS] please help on query
Next
From: Stephan Szabo
Date:
Subject: Re: Cascading deletions does not seem to work inside PL/PGSQL