| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | David Christensen <david(at)endpoint(dot)com> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Add two-arg for of current_setting(NAME, FALLBACK) |
| Date: | 2017-11-01 17:51:48 |
| Message-ID: | CAKFQuwazKj9bTbc+viqK_xeCs8a_=_54JHabAG14UAYZvWLjCA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Mar 19, 2015 at 3:41 PM, David Christensen <david(at)endpoint(dot)com>
wrote:
> The two-arg form of the current_setting() function will allow a
> fallback value to be returned instead of throwing an error when an
> unknown GUC is provided. This would come in most useful when using
> custom GUCs; e.g.:
>
> -- returns current setting of foo.bar, or 'default' if not set
> SELECT current_setting('foo.bar', 'default')
>
This doesn't actually change the GUC in the system, right? Do we want a
side-effect version of this?
There is already a two-arg form where the second argument is a boolean -
there needs to be tests that ensure proper behavior and function lookup
resolution.
No docs.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nico Williams | 2017-11-01 18:02:38 | Re: [PATCH] Add two-arg for of current_setting(NAME, FALLBACK) |
| Previous Message | Tom Lane | 2017-11-01 17:36:46 | Re: ALTER COLUMN TYPE vs. domain constraints |