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

From: "Ligia Pimentel" <pimentel_ligia(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to find out if an index is unique?
Date: 2002-07-17 22:27:33
Message-ID: ah4upu$km2$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

You could also use describe (in psql environment )

psql mydatabase
mydatabase=# \d indexname

Index "indexname"
Attribute | Type
------------+---------------
fieldname | datatype
unique btree

The word "unique" will show up only if the index has the unique
qualification, otherwise it will read only "btree".

Hope this helps.

Ligia

"Dirk Lutzebaeck" <lutzeb(at)aeccom(dot)com> wrote in message
news:15669(dot)16833(dot)74916(dot)773006(at)cayambe(dot)core(dot)aeccom(dot)com(dot)(dot)(dot)
>
> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2002-07-17 22:33:07 Re: Seeding
Previous Message Tom Lane 2002-07-17 17:43:50 Re: [HACKERS] why is postgres estimating so badly?