Re: [HACKERS] taking stdbool.h into use - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] taking stdbool.h into use
Date
Msg-id ddb90046-364a-94f1-893c-7bec8c931ae7@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] taking stdbool.h into use  (Michael Paquier <michael@paquier.xyz>)
Responses Re: [HACKERS] taking stdbool.h into use  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On 3/1/18 23:34, Michael Paquier wrote:
> Indeed, this is wrong.  Peter, why did you switch suddendly this patch
> as ready for committer?  The patch is waiting for your input as you
> mentioned that the GIN portion of this patch series is not completely
> baked yet.  So I have switched the patch in this state.

After more digging, there are more problems with having a bool that is
not 1 byte.  For example, pg_control has a bool field, so with a
different bool size, pg_control would be laid out differently.  That
would require changing all the mentions of bool to bool8 where the end
up on disk somehow, as I had already done for the system catalog
structures, but we don't know all the other places that would be affected.

So I'm going back to my proposal from December, to just use stdbool.h
when sizeof(bool) == 1, and add a static assertion to prevent other
configurations.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: JIT compiling with LLVM v11
Next
From: Laurenz Albe
Date:
Subject: Re: [submit code] I develop a tool for pgsql, how can I submit it