Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Shouldn't pg_(sh)seclabel.provider be marked NOT NULL?
Date: 2014-06-20 17:01:30
Message-ID: 7644.1403283690@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2014-06-20 17:39:31 Re: JSON and Postgres Variable Queries
Previous Message Tom Lane 2014-06-20 16:22:56 Re: modify custom variables