Testing truthiness of GUC variables?

From: Abelard Hoffman <abelardhoffman(at)gmail(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Testing truthiness of GUC variables?
Date: 2014-09-15 06:17:42
Message-ID: CACEJHMi3ArDpcpRZgKU-=FFg+9GLLXmgr4rAojUTS67ei6Y5Ng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 (all
case-insensitive) or any unambiguous prefix of these.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Abelard Hoffman 2014-09-15 06:20:41 Re: Testing truthiness of GUC variables?
Previous Message cowwoc 2014-09-15 05:22:21 Why isn't Java support part of Postgresql core?