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

From Bryn Llewellyn
Subject Re: Two questions about "pg_constraint"
Date
Msg-id CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com
Whole thread Raw
In response to Re: Two questions about "pg_constraint"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
That's the answer I was seeking. So it's case closed for both of my « Two questions about "pg_constraint" ». Thanks, Tom. And thanks to the others who've contributed to this thread.



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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Two questions about "pg_constraint"
Next
From: Вадим Самохин
Date:
Subject: questions about snapshot building logic