Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j093l-00071B-Rw for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Feb 2020 19:13:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j093k-0002RT-MW for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Feb 2020 19:13:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j093k-0002PH-EQ for pgsql-bugs@lists.postgresql.org; Fri, 07 Feb 2020 19:13:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j093h-0004Cq-Q6 for pgsql-bugs@lists.postgresql.org; Fri, 07 Feb 2020 19:13:00 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 017JCrGM029148; Fri, 7 Feb 2020 14:12:53 -0500 From: Tom Lane To: gabrielle@pdx.postgresql.us cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16248: ALTER SYSTEM quoting of values does not work as expected In-reply-to: <16248-654fbee7845c6abf@postgresql.org> References: <16248-654fbee7845c6abf@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 07 Feb 2020 18:20:12 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29146.1581102773.1@sss.pgh.pa.us> Date: Fri, 07 Feb 2020 14:12:53 -0500 Message-ID: <29147.1581102773@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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