Re: Add Boolean node

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add Boolean node
Date: 2022-01-13 09:48:01
Message-ID: CAFj8pRA9Oe3sfh3Z=8ntUECuMBqBSLb_nhNNUNh2nK3n0AqWCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

po 3. 1. 2022 v 14:18 odesílatel Peter Eisentraut <
peter(dot)eisentraut(at)enterprisedb(dot)com> napsal:

>
> On 03.01.22 12:04, Peter Eisentraut wrote:
> > On 27.12.21 10:02, Peter Eisentraut wrote:
> >> This patch adds a new node type Boolean, to go alongside the "value"
> >> nodes Integer, Float, String, etc. This seems appropriate given that
> >> Boolean values are a fundamental part of the system and are used a lot.
> >>
> >> Before, SQL-level Boolean constants were represented by a string with
> >> a cast, and internal Boolean values in DDL commands were usually
> >> represented by Integer nodes. This takes the place of both of these
> >> uses, making the intent clearer and having some amount of type safety.
> >
> > Here is an update of this patch set based on the feedback. First, I
> > added a patch that makes some changes in AlterRole() that my original
> > patch might have broken or at least made more confusing. Unlike in
> > CreateRole(), we use three-valued logic here, so that a variable like
> > issuper would have 0 = no, 1 = yes, -1 = not specified, keep previous
> > value. I'm simplifying this, by instead using the dissuper etc.
> > variables to track whether a setting was specified. This makes
> > everything a bit simpler and makes the subsequent patch easier.
> >
> > Second, I added the suggest by Tom Lane to rename to fields in the
> > used-to-be-Value nodes to be different in each node type (ival, fval,
> > etc.). I agree that this makes things a bit cleaner and reduces the
> > changes of mixups.
> >
> > And third, the original patch that introduces the Boolean node with some
> > small changes based on the feedback.
>
> Another very small update, attempting to appease the cfbot.

This is almost trivial patch

There are not problems with patching, compilation and tests

make check-world passed

There are not objection from me or from community

I'll mark this patch as ready for committer

Regards

Pavel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-01-13 09:51:33 Re: support for MERGE
Previous Message Alvaro Herrera 2022-01-13 09:22:21 Re: row filtering for logical replication