Re: Two questions about "pg_constraint"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general list <pgsql-general(at)lists(dot)postgresql(dot)org>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Subject: Re: Two questions about "pg_constraint"
Date: 2022-08-27 02:19:07
Message-ID: 2159876.1661566747@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bryn Llewellyn <bryn(at)yugabyte(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bryn Llewellyn 2022-08-27 17:57:55 Re: Two questions about "pg_constraint"
Previous Message Christophe Pettus 2022-08-27 02:02:54 Re: Two questions about "pg_constraint"