Allow \pset to parse "on or off" for boolean values

Поиск
Список
Период
Сортировка
От Chad Wagner
Тема Allow \pset to parse "on or off" for boolean values
Дата
Msg-id 81961ff50702181000o2b15aed9g4098580a33ee73e9@mail.gmail.com
обсуждение исходный текст
Ответы Re: Allow \pset to parse "on or off" for boolean values  (Bruce Momjian <bruce@momjian.us>)
Re: Allow \pset to parse "on or off" for boolean values  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-patches
This is a TODO item:

        o Allow psql \pset boolean variables to set to fixed values, rather
          than toggle


Basically allows for:
test=# \pset expanded on
Expanded display is on.
test=# \pset footer off
Default footer is off.
test=# \pset footer
Default footer is on.
test=# \pset footer
Default footer is off.
test=# \pset footer
Default footer is on.


Basically the change is to check if value in do_pset is != NULL to call ParseVariableBool to get a true/false and set the value directly, of the second parameter is not provided then the "old logic" of toggling is supported.

The pset variables that are adjusted are:
expanded
numericlocale
tuples_only
pager (supports on/off/always now)
footer

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: further bootstrap cleanup
Следующее
От: "Nikolay Samokhvalov"
Дата:
Сообщение: Re: patch for contrib/xml2