Bug in Configuration Setting Functions after a Commit

Поиск
Список
Период
Сортировка
От João felipe Chiarelli Bourscheid
Тема Bug in Configuration Setting Functions after a Commit
Дата
Msg-id CAKJNEk=CJsz_W17i-1PL_PH1igteFhJT_L6_7jvLfg5TT8D6ow@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bug in Configuration Setting Functions after a Commit
Список pgsql-bugs
Hello:

I'm enthusiastic about the PostgreSQL project and this is my first bug report. Please apologize if I'm on the wrong channel.

The bug is the following: when I set a custom variable using the configuration settings functions within a transaction, after I commit the transaction, instead of the variable becoming null, it becomes an empty string.

How to reproduce:


SELECT current_setting('custom.user_id', true)::INTEGER; -- NULL

BEGIN;

SELECT set_config('custom.user_id', '2', true);

SELECT current_setting('custom.user_id', true)::INTEGER; -- 2

END;

SELECT current_setting('custom.user_id', true)::INTEGER; -- Empty string instead of null

PostgreSQL version: PostgreSQL 15.10 (Debian 15.10-0+deb12u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit


В списке pgsql-bugs по дате отправления: