Re: define bool in pgtypeslib_extern.h

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Meskes <meskes(at)postgresql(dot)org>
Subject: Re: define bool in pgtypeslib_extern.h
Date: 2019-10-26 19:29:03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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:


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.


In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-10-26 20:12:20 Re: define bool in pgtypeslib_extern.h
Previous Message Tom Lane 2019-10-26 19:03:18 Re: pg_dump compatibility level / use create view instead of create table/rule