Re: BUG #16248: ALTER SYSTEM quoting of values does not work as expected

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gabrielle(at)pdx(dot)postgresql(dot)us
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16248: ALTER SYSTEM quoting of values does not work as expected
Date: 2020-02-07 19:12:53
Message-ID: 29147.1581102773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-02-07 19:17:44 Re: BUG #16249: Partition pruning blocks on exclusively locked table partition
Previous Message PG Bug reporting form 2020-02-07 19:10:05 BUG #16249: Partition pruning blocks on exclusively locked table partition