Shouldn't pg_(sh)seclabel.provider be marked NOT NULL? - Mailing list pgsql-hackers

From Tom Lane
Subject Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?
Date
Msg-id 7644.1403283690@sss.pgh.pa.us
Whole thread Raw
Responses Re: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Some of my Salesforce colleagues are looking into making every system
catalog be declared with a true primary key.  They came across the
fact that pg_seclabel and pg_shseclabel are declared with unique
indexes that include the "provider" column, but that column does not
get marked as NOT NULL during initdb.  Shouldn't it be?  For that
matter, it doesn't look to me like the code intends to ever store
a null value into the label column either --- should that also be
marked NOT NULL?

I think we've generally been lazy about marking variable-width catalog
columns as NOT NULL (note bootstrap mode will mark fixed-width columns
as NOT NULL automatically).  I'm not necessarily arguing to try to clean
this up altogether, but it would be good I think if indexable columns
got marked NOT NULL whenever possible.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: modify custom variables
Next
From: Joey Caughey
Date:
Subject: JSON and Postgres Variable Queries