Re: ALTER SYSTEM and GUC_LIST_QUOTE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: ALTER SYSTEM and GUC_LIST_QUOTE
Дата
Msg-id 10860.1438980591@sss.pgh.pa.us
обсуждение исходный текст
Ответ на ALTER SYSTEM and GUC_LIST_QUOTE  (Adam Brightwell <adam.brightwell@crunchydatasolutions.com>)
Список pgsql-hackers
Adam Brightwell <adam.brightwell@crunchydatasolutions.com> writes:
> While testing some behaviors with ALTER SYSTEM I discovered that GUC
> parameters with the GUC_LIST_QUOTE flag have a potential issue.

> As an example,
> ALTER SYSTEM SET shared_preload_libraries = '';
> Results in the following output in postgresql.auto.conf:
> shared_preload_libraries = '""';
> Therefore, when attempting to restart postgres the following error is
> encountered:
> FATAL:  could not access file "": No such file or directory

I think this is correct.  You specified one empty item in the list.

> As well, specifying multiple items:
> ALTER SYSTEM SET shared_preload_libraries = 'foo,bar';
> Results in:
> shared_preload_libraries = '"foo,bar"';

This one is definitely pilot error; you should have said

ALTER SYSTEM SET shared_preload_libraries = foo,bar;
or
ALTER SYSTEM SET shared_preload_libraries = 'foo','bar';

The quotes make it a single item.

There isn't a way to use ALTER SYSTEM SET to set a list variable to
an empty list, but that is true of SET as well, and nobody's ever
complained.  In the ALTER SYSTEM case at least you can use RESET.
        regards, tom lane



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

Предыдущее
От: Adam Brightwell
Дата:
Сообщение: ALTER SYSTEM and GUC_LIST_QUOTE
Следующее
От: Andrew Dunstan
Дата:
Сообщение: tap tests remove working directories