pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
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: Fri, 26 Aug 2022 22:19:07 -0400
Message-ID: <2159876.1661566747@sss.pgh.pa.us> (raw)
In-Reply-To: <81677DFB-5C73-4737-B42D-EF950D25FFB1@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>

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





view thread (16+ messages)  latest in thread

Message-ID: <2159876.1661566747@sss.pgh.pa.us>
Permalink:  ../2159876.1661566747@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2159876.1661566747@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, bryn@yugabyte.com, xof@thebuild.com, adrian.klaver@aklaver.com, david.g.johnston@gmail.com
  Subject: Re: Two questions about "pg_constraint"
  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>

* 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