Re: Getting NOT NULL constraint from pg_attribute - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Getting NOT NULL constraint from pg_attribute
Date
Msg-id 29075.1535039315@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting NOT NULL constraint from pg_attribute  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: schema private functions
Next
From: Tom Lane
Date:
Subject: Re: A really subtle lexer bug