Re: BUG #16248: ALTER SYSTEM quoting of values does not work as expected - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16248: ALTER SYSTEM quoting of values does not work as expected
Date
Msg-id 29147.1581102773@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16248: ALTER SYSTEM quoting of values does not work as expected  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> tl;dr:
> ALTER SYSTEM SET log_statement = 'all'; -- quotes required around the new
> value

The reason for that is that ALL is a reserved word in SQL.

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

Well, you could quote the list elements individually, eg

ALTER SYSTEM SET shared_preload_libraries = 'pg_stat_statements','plprofiler';

But this:

> ALTER SYSTEM SET shared_preload_libraries =
> 'pg_stat_statements,plprofiler';

says you just want one list element that happens to include a comma.

No, the syntax rules here are not the same as they are in postgresql.conf.

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

AFAICS the documentation statements you quoted are accurate.

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16249: Partition pruning blocks on exclusively locked table partition
Next
From: Tom Lane
Date:
Subject: Re: BUG #16249: Partition pruning blocks on exclusively locked table partition