Re: NOT NULL markings for BKI columns

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: NOT NULL markings for BKI columns
Дата
Msg-id 21364.1424022885@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: NOT NULL markings for BKI columns  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: NOT NULL markings for BKI columns
Список 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 по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: NOT NULL markings for BKI columns
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Sequence Access Method WIP