[GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
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 on, off, true, false, yes, no, 1, 0

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
On Sun, Sep 14, 2014 at 11:17 PM, Abelard Hoffman abelardhoff...@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

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Kevin Grittner
Abelard Hoffman abelardhoff...@gmail.com wrote: Boolean values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of these. is there a built-in function I can call, given the value from current_setting('myapp.audit'), that will test it

Re: [GENERAL] Testing truthiness of GUC variables?

2014-09-15 Thread Abelard Hoffman
On Mon, Sep 15, 2014 at 5:39 AM, Kevin Grittner kgri...@ymail.com wrote: Abelard Hoffman abelardhoff...@gmail.com wrote: Boolean values can be written as on, off, true, false, yes, no, 1, 0 (all case-insensitive) or any unambiguous prefix of these. is there a built-in function I can