Re: Testing truthiness of GUC variables?

Поиск
Список
Период
Сортировка
От Abelard Hoffman
Тема Re: Testing truthiness of GUC variables?
Дата
Msg-id CACEJHMhpz2gNP2MhWYYq8Uj0sBt1b25Nkq2ksLsPTrAu+KOzGQ@mail.gmail.com
обсуждение исходный текст
Ответ на Testing truthiness of GUC variables?  (Abelard Hoffman <abelardhoffman@gmail.com>)
Ответы Re: Testing truthiness of GUC variables?  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general


On Sun, Sep 14, 2014 at 11:17 PM, Abelard Hoffman <abelardhoffman@gmail.com> wrote:
If I set a custom GUC variable to a boolean value, such as:

  SET myapp.audit = 'on';

is there a way to test it for truthiness in the same way the standard built-in variables are? IOW, the docs say a boolean can be written as:

Boolean values can be written as onofftruefalseyesno10 (all case-insensitive) or any unambiguous prefix of these.


Sorry, hit send too soon. I meant to ask, is there a built-in function I can call, given the value from current_setting('myapp.audit'), that will test it using the same logic?

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

Предыдущее
От: Abelard Hoffman
Дата:
Сообщение: Testing truthiness of GUC variables?
Следующее
От: Marti Raudsepp
Дата:
Сообщение: Re: Why isn't Java support part of Postgresql core?