Andres Freund wrote:
Unless I am missing something major, that doesn't seem to achieve all that much. A cast to a char based bool wouldn't normalize this to 0 or 1. So you're still not guaranteed to be able to do somebool == anotherbool when either are set based on such a macro.
In C99 cast to bool return 0 or 1 only. In older compilers nothing changes (Now the code is designed to "char == char"). I think this is a good option. But of course to write bool and use char strange.
-- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers