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

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Dirk Lutzebaeck <lutzeb(at)aeccom(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to find out if an index is unique?
Date: 2002-07-17 10:15:07
Message-ID: Pine.LNX.4.44.0207171312290.9911-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 17 Jul 2002, Dirk Lutzebaeck wrote:

Yes.

Select the oid from pg_class where relname is your index name.
Then search in pg_index for column "indisunique" using the previous oid
as "indexrelid".

>
> 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
>

--
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Luis Alberto Amigo Navarro 2002-07-17 10:17:40 why is postgres estimating so badly?
Previous Message Dirk Lutzebaeck 2002-07-17 10:06:57 How to find out if an index is unique?