From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Eugen Konkov <kes-kes(at)yandex(dot)ru> |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: Improve documentation for current_setting function |
Date: | 2019-02-22 20:29:01 |
Message-ID: | 20190222202901.yxby73nb3rp27qvh@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Fri, Feb 22, 2019 at 11:43:54AM +0200, Eugen Konkov wrote:
> Hello Bruce,
>
> > How do you like the attached patch, which clarifies this?
>
> >>in which case a missing parameter returns
> >>! NULL.
>
> not always. It can be NULL or empty string. It depends if the current
> session is new or after finished transaction which makes 'local' changes
> to setting
>
> Take into account these steps: https://www.postgresql.org/message-id/15646-0d3caee9f6266f60%40postgresql.org
Yes, I saw that recent thread.
> From my user point of view. if the boot value before transaction was
> NULL then after transaction it MUST stay NULL and not empty string.
>
> This will be consistent with that if I open new parallel session it
> will return NULL.
>
> Also I see NULL value (if setting was not defined) is useful.
>
>
> Also this:
> set_config( 'my.name', NULL )
> must set 'my.name' to NULL or must issue warning about NULL is turned
> into empty string.
>
> Personally I dislike that NULL is converted to empty string. This
> looks ugly. =(
Understood.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2019-02-23 11:47:58 | Using file_fdw to load tsv file into Foreign Table gives Permission denied error |
Previous Message | PG Doc comments form | 2019-02-22 11:03:43 | Postgres make uninstall |