Re: boolean in C

From: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org, Bernd Helmle <mailings(at)oopsware(dot)de>
Subject: Re: boolean in C
Date: 2009-07-16 14:32:49
Message-ID: D1C736DE-E48F-418B-8D41-DFAF9F299C82@pointblue.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 16 Jul 2009, at 15:17, Tom Lane wrote:

> Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl> writes:
>
> That's hardly going to improve readability for anyone. Also, it will
> flat out not work for the catalog struct declarations. When we say
> "bool relhasindex;" the compiler had better think that that's a
> one-byte field.

Sure, but I would certainly hope, there's not too many places where
you actually convert it from disc representation, to internal and vice
versa.

>
>> And it is pretty annoying, when your product also has its own BOOLean
>> defined...
>
> IOW you're not using stdbool either?

Well, saying that I don't is quite an overstatement. It was decided
long before I started working for that customer, and is full of
problems like that. But still,
it would be nice for postgresql to at least not cause problems like
that. Having said that, I will probably fix it on customer's side, but
I wanted to see if you guys will be happy with patch that changes that
in postgresql.

thanks .

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-16 15:16:31 Re: Review remove {join, from}_collapse_limit, add enable_join_ordering
Previous Message Peter Eisentraut 2009-07-16 14:30:12 Re: Mostly Harmless: c++bookends - patch 2 of 4