pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryn Llewellyn <bryn@yugabyte.com>
To: Tom Lane PostgreSQL <tgl@sss.pgh.pa.us>
Cc: Christophe Pettus <xof@thebuild.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: Two questions about "pg_constraint"
Date: Sat, 27 Aug 2022 10:57:55 -0700
Message-ID: <CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com> (raw)
In-Reply-To: <2159876.1661566747@sss.pgh.pa.us>
References: <496793CE-A048-434B-ABC0-6BFC0C65C3EC@yugabyte.com>
	<520dd935-a12c-6444-99a7-5a8f2d0f046d@aklaver.com>
	<F5DB0B63-B99F-455C-99F7-67F219075F7F@yugabyte.com>
	<19BF09AA-B8B1-4837-905E-F6EAABC3E2E2@thebuild.com>
	<23F434B6-9293-4F80-9CB3-6786E07960B8@yugabyte.com>
	<E814ECF0-D08B-4EF6-AD3F-782212F2747F@thebuild.com>
	<81677DFB-5C73-4737-B42D-EF950D25FFB1@yugabyte.com>
	<2159876.1661566747@sss.pgh.pa.us>

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.

tgl@sss.pgh.pa.us wrote:

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

view thread (16+ messages)

Message-ID: <CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com>
Permalink:  ../CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com/
Also on:    postgresql.org/message-id/CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bryn@yugabyte.com, tgl@sss.pgh.pa.us, xof@thebuild.com, adrian.klaver@aklaver.com, david.g.johnston@gmail.com
  Subject: Re: Two questions about "pg_constraint"
  In-Reply-To: <CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com>
  References: <496793CE-A048-434B-ABC0-6BFC0C65C3EC@yugabyte.com> <520dd935-a12c-6444-99a7-5a8f2d0f046d@aklaver.com> <F5DB0B63-B99F-455C-99F7-67F219075F7F@yugabyte.com> <19BF09AA-B8B1-4837-905E-F6EAABC3E2E2@thebuild.com> <23F434B6-9293-4F80-9CB3-6786E07960B8@yugabyte.com> <E814ECF0-D08B-4EF6-AD3F-782212F2747F@thebuild.com> <81677DFB-5C73-4737-B42D-EF950D25FFB1@yugabyte.com> <2159876.1661566747@sss.pgh.pa.us> <CAAB2CE0-F545-4C87-9466-B499A97378DC@yugabyte.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox