Re: pgsql: Disallow newlines in parameter values to be set in ALTER SYSTEM. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Disallow newlines in parameter values to be set in ALTER SYSTEM.
Date
Msg-id 30584.1459886575@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Disallow newlines in parameter values to be set in ALTER SYSTEM.  (Oleg Bartunov <obartunov@gmail.com>)
List pgsql-committers
Oleg Bartunov <obartunov@gmail.com> writes:
> On Tue, Apr 5, 2016 at 9:05 AM, Oleg Bartunov <obartunov@gmail.com> wrote:
>> it's also fixed problem with setting parameter to ''. Before
>> alter system SET shared_preload_libraries = '';

> Ooops,  it doesn't :(
> FATAL:  could not access file "": No such file or directory

> cat /usr/local/pgsql-head/data/postgresql.auto.conf
> # Do not edit this file manually!
> # It will be overwritten by ALTER SYSTEM command.
> shared_preload_libraries = '""'

I do not think this is a bug, or at least not an ALTER SYSTEM bug.
What you wrote there means a single list entry that is an empty string,
and ALTER SYSTEM reproduced that faithfully.

We do have a shortcoming here, which is that the SET syntax lacks any
way to explicitly set a GUC_LIST_INPUT variable to an empty list.
It's been like that for a long time with few complaints, but maybe
we should do something about it.

            regards, tom lane


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Align all shared memory allocations to cache line boundaries.
Next
From: Robert Haas
Date:
Subject: pgsql: Fix parallel-safety code for parallel aggregation.