Re: define bool in pgtypeslib_extern.h - Mailing list pgsql-hackers

From Andrew Gierth
Subject Re: define bool in pgtypeslib_extern.h
Date
Msg-id 877e4rmi2y.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to Re: define bool in pgtypeslib_extern.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: define bool in pgtypeslib_extern.h
Re: define bool in pgtypeslib_extern.h
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposition to use '==' as synonym for 'IS NOT DISTINCT FROM'
Next
From: Tom Lane
Date:
Subject: Re: define bool in pgtypeslib_extern.h