That can be tricky because you can't emulate the semantics of the C99 bool type.
In C99
(bool)256 == 1
but on systems which emulate bool with, e.g., an 8-bit unsigned char then (bool)256 == 0
Re:PostgreSQL 10.2 Released
by petereisentraut on Friday February 09, 2018 @05:26PM
(#16344403)
Another problem is that the bool provided by stdbool.h is 4 bytes on some platforms, which breaks PostgreSQL all over the place.
Indeed. For a glimpse for the non-PG-hackers (like me), there's an ongoing attempt discussed in the PG-hackers mailing list to use stdbool.h.