Remove comment about manually flipping attnotnull

Lists: pgsql-hackers
From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Remove comment about manually flipping attnotnull
Date: 2014-07-24 12:29:45
Message-ID: 20140724122945.GD16857@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi,

catalogs.sgml has this comment:
This represents a not-null constraint. It is possible to
change this column to enable or disable the constraint.

Someone on irc just took that as "permission" to do so manually...

That comment has been there since 1efd7330c/2000-11-29, in the the
initial commit adding catalogs.sgml. Does somebody object to just
removing the second part of the comment in all branches?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove comment about manually flipping attnotnull
Date: 2014-07-24 16:51:09
Message-ID: 6463.1406220669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> catalogs.sgml has this comment:
> This represents a not-null constraint. It is possible to
> change this column to enable or disable the constraint.

> Someone on irc just took that as "permission" to do so manually...

Did anything especially bad happen? Obviously, turning it on wouldn't
have verified that the column contains no nulls, but hopefully anyone
who's bright enough to do manual catalog updates would realize that.
I think things would generally have worked otherwise, in particular
sinval signalling would have happened (IIRC).

> That comment has been there since 1efd7330c/2000-11-29, in the the
> initial commit adding catalogs.sgml. Does somebody object to just
> removing the second part of the comment in all branches?

Seems like a reasonable idea, in view of the fact that we're thinking
about adding pg_constraint entries for NOT NULL, in which case frobbing
attnotnull by itself would definitely be a bad thing.

regards, tom lane


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove comment about manually flipping attnotnull
Date: 2014-10-11 21:24:12
Message-ID: 20141011212412.GI21267@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Jul 24, 2014 at 12:51:09PM -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > catalogs.sgml has this comment:
> > This represents a not-null constraint. It is possible to
> > change this column to enable or disable the constraint.
>
> > Someone on irc just took that as "permission" to do so manually...
>
> Did anything especially bad happen? Obviously, turning it on wouldn't
> have verified that the column contains no nulls, but hopefully anyone
> who's bright enough to do manual catalog updates would realize that.
> I think things would generally have worked otherwise, in particular
> sinval signalling would have happened (IIRC).
>
> > That comment has been there since 1efd7330c/2000-11-29, in the the
> > initial commit adding catalogs.sgml. Does somebody object to just
> > removing the second part of the comment in all branches?
>
> Seems like a reasonable idea, in view of the fact that we're thinking
> about adding pg_constraint entries for NOT NULL, in which case frobbing
> attnotnull by itself would definitely be a bad thing.

Change applied to head.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +