pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Michael Meskes <meskes@postgresql.org>
Subject: Re: define bool in pgtypeslib_extern.h
Date: Sat, 26 Oct 2019 20:29:03 +0100
Message-ID: <877e4rmi2y.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <32373.1572110364@sss.pgh.pa.us>
References: <CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com>
	<16583.1572010913@sss.pgh.pa.us>
	<18578.1572020755@sss.pgh.pa.us>
	<CAA4eK1LUFKhiq4vfrvG089wtSvnbfAs3sdTFdbuq428bQ7wCzg@mail.gmail.com>
	<32373.1572110364@sss.pgh.pa.us>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.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:

Ugh.

 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.

-- 
Andrew.





view thread (15+ messages)  latest in thread

Message-ID: <877e4rmi2y.fsf@news-spur.riddles.org.uk>
Permalink:  ../877e4rmi2y.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/877e4rmi2y.fsf@news-spur.riddles.org.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, tgl@sss.pgh.pa.us, amit.kapila16@gmail.com, pgsql-hackers@lists.postgresql.org, meskes@postgresql.org
  Subject: Re: define bool in pgtypeslib_extern.h
  In-Reply-To: <877e4rmi2y.fsf@news-spur.riddles.org.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox