Re: NOT NULL markings for BKI columns

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: NOT NULL markings for BKI columns
Date: 2015-02-21 21:10:34
Message-ID: 20150221211034.GC2037@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-02-20 19:06:50 -0300, Alvaro Herrera wrote:
> Andres Freund wrote:
> > On 2015-02-15 12:54:45 -0500, Tom Lane wrote:
> > > Andres Freund <andres(at)2ndquadrant(dot)com> writes:
>
> > > BTW, the precedent of PG_USED_FOR_ASSERTS_ONLY would suggest calling
> > > this one PG_FORCE_NOT_NULL, or at least using underscores for word
> > > breaks in whatever we end up calling it.
> >
> > I've named it BKI_FORCE_(NOT_)?NULL.
> >
> > So, I've implemented this - turned out to be a bit more work than I'd
> > expected... I had to whack around the representation Catalog.pm returns
> > for columns, but I think the new representation for columns is better
> > anyway. Doesn't look too bad.
>
> Just gave it a quick read, I think it's good. +1 for your
> implementation.

Unless somebody protests I'm going to push this soon.

> > I've also added BKI_FORCE_NULL as you mentioned it as being possibly
> > useful, was easy enough. I haven't identified a user so far though, so
> > we could just remove it if we want.
>
> I think we should just save this part of the patch until some use turns up.

I pondered this for a while and I don't agree. If the flag had been
available a couple column that now use 0 instead of NULLs and such would
have been NULLable. And since it's very few lines I'm inclined to keep
it, it's really cheap enough.

Greetings,

Andres Freund

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-02-21 21:14:23 Re: NOT NULL markings for BKI columns
Previous Message Andrew Dunstan 2015-02-21 21:09:02 Re: Add min and max execute statement time in pg_stat_statement