Re: finding UNIQUES in information_schema - Mailing list pgsql-sql

From Tom Lane
Subject Re: finding UNIQUES in information_schema
Date
Msg-id 3622.1239912596@sss.pgh.pa.us
Whole thread Raw
In response to Re: finding UNIQUES in information_schema  (Gerardo Herzig <gherzig@fmed.uba.ar>)
List pgsql-sql
Gerardo Herzig <gherzig@fmed.uba.ar> writes:
> Tom Lane wrote:
>> No, they contain information about constraints, period.  How did you
>> create those indexes?  If you made them via SQL-standard PRIMARY KEY or
>> UNIQUE constraint syntax, they should show in the information_schema.
>> Otherwise not.

> Well, i just dont get it.

No, apparently not.  The term "constraint" in this context has a very
specific meaning; it's talking about the CONSTRAINT syntax in CREATE
TABLE or ALTER TABLE.  This is per SQL specification.  Indexes are an
implementation detail that the standard doesn't concern itself with;
therefore anything you do with CREATE INDEX is outside the standard and
is not reflected in the standard-defined information_schema.
        regards, tom lane


pgsql-sql by date:

Previous
From: Gerardo Herzig
Date:
Subject: Re: finding UNIQUES in information_schema
Next
From: "Paulo (O2 Tecnologia)"
Date:
Subject: Problemas com Procedure no PostgreSQL