PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16248
PG Version11.6
Opened2020-02-07 18:20:12+00
Reported bygabrielle roth

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16248
Logged by:          gabrielle roth
Email address:      (redacted)
PostgreSQL version: 11.6
Operating system:   Ubuntu

Hi all!

I tried out `ALTER SYSTEM` for the first time last week, and ran into
something that confused me:

ALTER SYSTEM SET log_statement = 'all'; -- quotes required around the new
ALTER SYSTEM SET shared_preload_libraries = pg_stat_statements,plprofiler;
-- requires the new value *not* be quoted, this is what's confusing me

How I got there:
Initially, I tried quotes around the value, as that's the way I'd write it
in postgresql.conf:
ALTER SYSTEM SET shared_preload_libraries =

When I restarted my database to apply the change, it failed with this error
(note the value now has double quotes)
FATAL:  could not access file "pg_stat_statements,plprofiler": No such file
or directory

And this is what ended up in
shared_preload_libraries = '"pg_stat_statements,plprofiler"'

From the docs for ALTER SYSTEM
"Values can be specified as string constants, identifiers, numbers, or
comma-separated lists of these, as appropriate for the particular

From the docs for "Setting parameters"
"String: In general, enclose the value in single quotes, doubling any single
quotes within the value. Quotes can usually be omitted if the value is a
simple number or identifier, however."

I eventually got help from a friend, who tipped me off that the value for
shared_preload_libraries should not be quoted.

That seems weird to me because of the requirement for quoting on other
settings, e.g. log_statement.

Is this expected behavior?  If so, can we get some examples in the docs to
help folks figure out the correct quoting rules?

Thank you!



2020-02-07 18:20:12+00PG Bug reporting formBUG #16248: ALTER SYSTEM quoting of values does not work as expected
2020-02-07 19:12:53+00Tom LaneRe: BUG #16248: ALTER SYSTEM quoting of values does not work as expected