Re: Add Boolean node - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Add Boolean node
Date
Msg-id CALNJ-vT2Rz+4GfnJgm60sqN07sg2H7Q31FLXqQ8tnf8aDonF6A@mail.gmail.com
Whole thread Raw
In response to Add Boolean node  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List 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

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message
Next
From: Fujii Masao
Date:
Subject: Re: Allow escape in application_name