Re: Getting NOT NULL constraint from pg_attribute

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Wu Ivy <ivywuyzl(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Getting NOT NULL constraint from pg_attribute
Date: 2018-08-23 15:48:35
Message-ID: 29075.1535039315@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> And arguably there's a fair bit of redundancy in pg_attribute, just
> because it's convenient for tupledescs. Given that pg_attribute very
> commonly is the largest catalog table by far, that very well could use
> some attention. Without tupdescs in mind, there's really not much point
> for pg_attribute to repeat a good portion of pg_type again, for example,
> nor is attcacheoff really meaningful.

Agreed about attcacheoff, but I'm less sure that we can drop the
"redundant" info copied from pg_type. The sticking point there is
that somebody could drop a column, then drop the type the column had,
but you still need to be able to skip over values in that column.
So at least attlen and attalign are not removable.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-08-23 15:54:30 Re: A really subtle lexer bug
Previous Message Pavel Stehule 2018-08-23 15:47:28 Re: proposal: schema private functions