Re: Add Boolean node

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Add Boolean node
Дата
Msg-id b3989cca-fa81-4d23-bd85-5f499fe91585@enterprisedb.com
обсуждение исходный текст
Ответ на Add Boolean node  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Add Boolean node  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
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.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: An obsolete comment of pg_stat_statements
Следующее
От: Andrey Borodin
Дата:
Сообщение: Re: Index-only scans vs. partially-retrievable indexes