Re: BUG #15646: Inconsistent behavior for current_setting/set_config

From: Joe Conway <mail(at)joeconway(dot)com>
To: kes-kes(at)yandex(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org, PG Bug reporting form <noreply(at)postgresql(dot)org>
Subject: Re: BUG #15646: Inconsistent behavior for current_setting/set_config
Date: 2019-02-20 17:01:47
Message-ID: d2ac387b-e796-e3ef-10e5-e06fede7c973@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 2/20/19 11:10 AM, PG Bug reporting form wrote:
> The following bug has been logged on the website:
>
> Bug reference: 15646
> Logged by: Eugen Konkov
> Email address: kes-kes(at)yandex(dot)ru
> PostgreSQL version: 10.4
> Operating system: (Debian 10.4-2.pgdg90+1)
> Description:
>
> Hi.
>
> [documentation](https://www.postgresql.org/docs/11/functions-admin.html#FUNCTIONS-ADMIN-SET)
> describes that:
>
>>set_config sets the parameter setting_name to new_value. If is_local is
> true, the new value will only apply to the current transaction.
>
> Thus if I rollback transaction original value should be available.
>
> But current behavior returns empty string instead of NULL (the initial
> value) after transaction is rolled back. When I restart session, NULL is
> returned again as it is expected.

This has been discussed before and dismissed:
https://www.postgresql.org/message-id/flat/56842412.5000005%40joeconway.com

Personally I agree it is a bug, but I am not sure you will get much
support for that position.

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-02-20 17:11:15 Re: BUG #15646: Inconsistent behavior for current_setting/set_config
Previous Message Hans Buschmann 2019-02-20 16:17:08 AW: BUG #15641: Autoprewarm worker fails to start on Windows with huge pages in use Old PostgreSQL community/pgsql-bugs x

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-02-20 17:11:15 Re: BUG #15646: Inconsistent behavior for current_setting/set_config
Previous Message Tom Lane 2019-02-20 16:42:37 Re: list append syntax for postgresql.conf