Re: Add Boolean node - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Add Boolean node
Date
Msg-id 202112271510.qe2ppfopc7qy@alvherre.pgsql
Whole thread Raw
In response to Add Boolean node  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: Add Boolean node
List pgsql-hackers
On 2021-Dec-27, 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.

I like the idea.  I'm surprised that there is no notational savings in
the patch, however.

> diff --git a/src/test/regress/expected/create_function_3.out b/src/test/regress/expected/create_function_3.out
> index 3a4fd45147..e0c4bee893 100644
> --- a/src/test/regress/expected/create_function_3.out
> +++ b/src/test/regress/expected/create_function_3.out
> @@ -403,7 +403,7 @@ SELECT pg_get_functiondef('functest_S_13'::regproc);
>    LANGUAGE sql                                            +
>   BEGIN ATOMIC                                             +
>    SELECT 1;                                               +
> -  SELECT false AS bool;                                   +
> +  SELECT false;                                           +
>   END                                                      +

Hmm, interesting side-effect: we no longer assign a column name in this
case so it remains "?column?", just like it happens for other datatypes.
This seems okay to me.  (This is also what causes the changes in the
isolationtester expected output.)

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"Ni aún el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Add Boolean node
Next
From: "Joel Jacobson"
Date:
Subject: Re: Foreign key joins revisited