Re: bool: symbol name collision - Mailing list pgsql-bugs

From Greg Stark
Subject Re: bool: symbol name collision
Date
Msg-id AANLkTinM9e7g4rYXFI85eLFF4CPD1QUG5Vb_k4gOD9Lm@mail.gmail.com
Whole thread Raw
In response to Re: bool: symbol name collision  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-bugs
On Wed, May 12, 2010 at 1:01 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> The problem with the bool type is that it could have different sizes on
> different systems. =A0Which will lead to problems. =A0I doubt that that
> problem exists with int4.
>

I could imagine macros that do the wrong thing if the types they use
inside them have the wrong signedness...

I tihnk the reasons bool is particularly eggregious are a) we have
these misleading #ifdefs that don't do the right thing and b) there's
a stdbool.h making it hard for c99 programmers to avoid doing the
wrong thing. The other types are part of the postgres server interface
and module writers should just avoid redefining them -- if they do
they'll get errors. I think it would be nice to make that better but
at least they won't be silently redefining the postgres interfaces to
potentially incorrect definitions.

--=20
greg

pgsql-bugs by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: bool: symbol name collision
Next
From: Tom Lane
Date:
Subject: Re: bool: symbol name collision