Re: NOT NULL markings for BKI columns - Mailing list pgsql-hackers

From Tom Lane
Subject Re: NOT NULL markings for BKI columns
Date
Msg-id 21364.1424022885@sss.pgh.pa.us
Whole thread Raw
In response to Re: NOT NULL markings for BKI columns  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: NOT NULL markings for BKI columns  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> On 2015-02-15 12:31:10 -0500, Tom Lane wrote:
>> Where are you thinking of sticking that exactly, and will pgindent
>> do something sane with it?

> Hm, I was thinking about
>     /* extversion should never be null, but the others can be. */
>     text        extversion PG_FORCENOTNULL; /* extension version name */
> but pgindent then removes some of the space between text and extversion,
> making it
>     text extversion PG_FORCENOTNULL;    /* extension version name */
> an alternative where it doesn't do that is
>     text        PG_FORCENOTNULL(extversion);    /* extension version name */

> Not sure what's the best way here.

The former is clearly a lot more sane semantically, so I'd go with
that even if the whitespace is a bit less nice.

I notice that pgindent does a similar not-very-nice thing with
PG_USED_FOR_ASSERTS_ONLY.  I wonder if we could hack it to handle
those two identifiers specially?

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.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: NOT NULL markings for BKI columns
Next
From: Petr Jelinek
Date:
Subject: Re: Sequence Access Method WIP