Re: Two questions about "pg_constraint" - Mailing list pgsql-general

From Tom Lane
Subject Re: Two questions about "pg_constraint"
Date
Msg-id 2159876.1661566747@sss.pgh.pa.us
Whole thread Raw
In response to Re: Two questions about "pg_constraint"  (Bryn Llewellyn <bryn@yugabyte.com>)
Responses Re: Two questions about "pg_constraint"
List pgsql-general
Bryn Llewellyn <bryn@yugabyte.com> writes:
> My other question was about the "connamespace" column. It seemed to me,
> both at first and still now, that this is a clear instance of a
> transitive dependency.

I think a more productive way to think about it is that it's
denormalization for efficiency; specifically to let constraints
be looked up by name+namespace without having to get other
catalogs involved.  (SET CONSTRAINTS is one thing that requires
that, and I think there are others.)

            regards, tom lane



pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Two questions about "pg_constraint"
Next
From: Bryn Llewellyn
Date:
Subject: Re: Two questions about "pg_constraint"