Re: Add Boolean node - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add Boolean node
Date
Msg-id 1475338.1640616812@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add Boolean node  (Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>)
Responses Re: Add Boolean node
List pgsql-hackers
Ashutosh Bapat <ashutosh.bapat.oss@gmail.com> writes:
> That looks like a good change. I wonder what motivates that now? Why
> wasn't it added when the usages grew?

You'd have to find some of the original Berkeley people to get an
answer for that.  Possibly it's got something to do with the fact
that C didn't have a separate bool type back then ... or, going
even further back, that LISP didn't either.  In any case, it seems
like a plausible improvement now.

Didn't really read the patch in any detail, but I did have one idea:
I think that the different things-that-used-to-be-Value-nodes ought to
use different field names, say ival, rval, bval, sval not just "val".
That makes it more likely that you'd catch any code that is doing the
wrong thing and not going through one of the access macros.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Isaac Morland
Date:
Subject: Re: Foreign key joins revisited
Next
From: Alvaro Herrera
Date:
Subject: Re: Add Boolean node