Re: Most system catalog columns should be NOT NULL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Most system catalog columns should be NOT NULL
Date: 2002-07-07 23:35:43
Message-ID: 200207072335.g67NZh122142@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> A conversation in pgsql-interfaces reminded me that it would be a good
> idea for initdb to try to set attnotnull correctly for columns of the
> system catalogs. Although we generally don't recommend that people
> update catalogs directly, it's sometimes done anyway; having NOT NULL
> constraints set on the columns that mustn't be null would help make
> the system more robust.
>
> It would be fairly easy to make bootstrap.c set attnotnull to true
> for any column that's of a fixed-width datatype. That appears to
> solve 99% of the problem with an appropriate amount of effort.
> We could imagine inventing some BKI macro to explicitly label nullable
> or not-nullable columns in the include/catalog headers, but I don't
> think it's worth that much trouble.
>
> Comments?

Yep, should be done.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-07-07 23:43:01 Re: Issues Outstanding for Point In Time Recovery (PITR)
Previous Message Bruce Momjian 2002-07-07 23:29:30 Re: CLUSTER not lose indexes