Re: Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h)
Date
Msg-id CAEudQAreHGCmsSJ8An8vMNG5T_7DaB34rDM+9NEWdv-Td2Nacg@mail.gmail.com
Whole thread Raw
In response to Re: Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Em ter., 2 de set. de 2025 às 16:44, Tom Lane <tgl@sss.pgh.pa.us> escreveu:
Ranier Vilela <ranier.vf@gmail.com> writes:
> In libpq-fe.h has an artifact pre C99, pqbool.
> IMO this is not more necessary, once Postgres supports C99
> and bool becomes standard.

> So get ride of pqbool and use bool instead.

We can't really remove that typedef ever, because application code
might be using it.  Unlikely I concede, but nonetheless it's part
of libpq's exposed API.

We might be able to s/pqbool/bool/ in the struct, but I kind of
wonder if that wouldn't be an ABI break: at the very least it
would lead to subtle changes in code compiled to use the struct.
On the whole I see little value in taking any risk here.
Thanks Tom, for the explanation.
 
best regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Jacob Champion
Date:
Subject: Re: Get ride of pqbool artifact (src/interfaces/libpq/libpq-fe.h)
Next
From: Robert Haas
Date:
Subject: Re: plan shape work