Re: Add Boolean node

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add Boolean node
Date: 2021-12-28 03:19:31
Message-ID: CALNJ-vT2Rz+4GfnJgm60sqN07sg2H7Q31FLXqQ8tnf8aDonF6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
For buildDefItem():

+ if (strcmp(val, "true") == 0)
+ return makeDefElem(pstrdup(name),
+ (Node *) makeBoolean(true),
+ -1);
+ if (strcmp(val, "false") == 0)

Should 'TRUE' / 'FALSE' be considered above ?

- issuper = intVal(dissuper->arg) != 0;
+ issuper = boolVal(dissuper->arg) != 0;

Can the above be written as (since issuper is a bool):

+ issuper = boolVal(dissuper->arg);

Cheers

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2021-12-28 06:29:21 Re: Allow escape in application_name
Previous Message Bharath Rupireddy 2021-12-28 02:56:28 Re: Add checkpoint and redo LSN to LogCheckpointEnd log message