Re: define bool in pgtypeslib_extern.h

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: define bool in pgtypeslib_extern.h
Дата
Msg-id 877e4rmi2y.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: define bool in pgtypeslib_extern.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: define bool in pgtypeslib_extern.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: define bool in pgtypeslib_extern.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> On closer inspection, it seems to be just blind luck. For example,
 Tom> if I rearrange the inclusion order in a file using ecpglib.h:

Ugh.

 Tom> I'm inclined to think that we need to make ecpglib.h's
 Tom> bool-related definitions exactly match c.h,

I'm wondering whether we should actually go the opposite way and say
that c.h's "bool" definition should be backend only, and that in
frontend code we should define a PG_bool type or something of that ilk
for when we want "PG's 1-byte bool" and otherwise let the platform
define "bool" however it wants.

And we certainly shouldn't be defining "bool" in something that's going
to be included in the user's code the way that ecpglib.h is.

-- 
Andrew.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Следующее
От: Tom Lane
Дата:
Сообщение: Re: define bool in pgtypeslib_extern.h