From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Nico Williams <nico(at)cryptonector(dot)com>, David Christensen <david(at)endpoint(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Add two-arg for of current_setting(NAME, FALLBACK) |
Date: | 2017-11-02 13:12:12 |
Message-ID: | 17496ef9-4e3e-4e5b-1514-5406f5a41da2@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 11/1/17 14:02, Nico Williams wrote:
> There already _is_ a two-argument form of current_setting() that yours
> somewhat conflicts with:
>
> current_setting(setting_name [, missing_ok ])
>
> https://www.postgresql.org/docs/current/static/functions-admin.html
>
> I often use
>
> coalesce(current_setting(setting_name, true), default_value_here)
>
> as an implementation of current_setting() with a default value.
That appears to address this use case then. Do we need the new proposed
variant still?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2017-11-02 13:33:46 | Re: Client Connection redirection support for PostgreSQL |
Previous Message | Peter Eisentraut | 2017-11-02 13:11:21 | Re: list of credits for release notes |