Re: [HACKERS] taking stdbool.h into use

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [HACKERS] taking stdbool.h into use
Дата
Msg-id 396512c3-4349-f356-679a-a231093c5c37@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: [HACKERS] taking stdbool.h into use  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] taking stdbool.h into use  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
On 11/15/17 15:13, Peter Eisentraut wrote:
> I'm going to put this patch set as Returned With Feedback for now.  The
> GinNullCategory issues look like they will need quite a bit of work.
> But it will be worth picking this up some time.

I think the issue with GinNullCategory is practically unfixable.  This
is on-disk data that needs to be castable to an array of bool.  So
tolerating a bool of size other than 1 would either require a disk
format change or extensive code changes, neither of which seem
worthwhile at this point.

So here is a minimal patch set to perhaps wrap this up for the time
being.  I have added static assertions that check the sizes of
GinNullCategory and GinTernaryValue, which I think are the two critical
places that require compatibility with bool.  And then we include
<stdbool.h> only if its bool has size 1.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] static assertions in C++
Следующее
От: David Fetter
Дата:
Сообщение: Re: AS OF queries