Re: issue about information_schema REFERENTIAL_CONSTRAINTS - Mailing list pgsql-bugs

From Fabien COELHO
Subject Re: issue about information_schema REFERENTIAL_CONSTRAINTS
Date
Msg-id alpine.DEB.2.00.1009020741380.2656@localhost.localdomain
Whole thread Raw
In response to Re: issue about information_schema REFERENTIAL_CONSTRAINTS  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: issue about information_schema REFERENTIAL_CONSTRAINTS
List pgsql-bugs
Dear Peter,

>> I'm suggesting uniqueness in the "information_schema", which can be
>> provided independently by some tweaking in the view construction, I
>> think, for instance by adding the oid of the constraint or maybe the
>> table_name.
>
> The view is defined by the SQL standard.

No. The result of the view (the definition of the expected attributes) is
defined in the standard. But it is really a view on top of "pg_catalog".

You are right that some views of the information_schema are defined in the
standard, but they deal with restrictions of other relations, say the
privileges for the current user...

> We cannot change it.

Yes we can!  It, it is 100% postgresql:

  \d information_schema.referential_constraints
   View "information_schema.referential_constraints"
   ...
    FROM pg_namespace ncon
    JOIN pg_constraint con ON ncon.oid = con.connamespace
    JOIN pg_class c ON con.conrelid = c.oid

--
Fabien Coelho - CRI, Maths & Systèmes, MINES ParisTech

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #5629: ALTER SEQUENCE foo START execute a RESTART
Next
From: "KOIZUMI Satoru"
Date:
Subject: BUG #5636: extra "(" or missing ")"