Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvMGQ-004jP8-2S for pgsql-docs@arkaria.postgresql.org; Tue, 24 Oct 2023 18:36:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qvMGN-00BXjO-Kq for pgsql-docs@arkaria.postgresql.org; Tue, 24 Oct 2023 18:36:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvMGN-00BXi6-Cl for pgsql-docs@lists.postgresql.org; Tue, 24 Oct 2023 18:36:24 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qvMGG-002VR9-Dq; Tue, 24 Oct 2023 18:36:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=Wwtn3MqGe0AfbPSf7Bhq9P6x8G8i1tvS97B7ljYMUGs=; b=Lg1he h1E/8MkLrPj+RcjuvxCeEiYL8tLAuxQKoYY/wR2H2eMTuYZOf6KzJDmkRn5t+UGXLTAYxXH6uIWhq YqaoL/EEMTybirkyu/ypU69whKn3M9bmL+T8R7yBU49r+nNbjEICvgZx14hY0XMz6kDB3TIsmHJoM mCmrPxAMaBS07ZYn/FcVtfYkjr2UtDf6VASdP5/aOUnmcp65CyGjoyD8M1Pigz4ZSyFGJ4VIJnmWl sIqWgV2C7vq3sXi0REvcO9gzgW/4ILHePCBQHlBvaZ6ubRvcplf/UoqW1eCyUN8aPoJMZ4fcQIyro 0f15plojyokBAp563hqtZK0w1L/VA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qvMGE-00Ak6W-2y; Tue, 24 Oct 2023 14:36:14 -0400 Date: Tue, 24 Oct 2023 14:36:14 -0400 From: Bruce Momjian To: Tom Lane Cc: "Jonathan S. Katz" , "David G. Johnston" , splarv@ya.ru, pgsql-docs@lists.postgresql.org Subject: Re: 'value' has special behaviour in alter system Message-ID: References: <167105927893.1897.13227723035830709578@wrigleys.postgresql.org> <3417417.1671124227@sss.pgh.pa.us> <831891.1698170753@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="C+A94P0aj0ebtu9x" Content-Disposition: inline In-Reply-To: <831891.1698170753@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --C+A94P0aj0ebtu9x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 24, 2023 at 02:05:53PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I have developed the attached patch to document this. > > This seems a little imprecise: > > + Values with non-alphanumeric characters must be quoted. > > I think accurate is more like "Values that are neither a number > nor a valid identifier must be quoted." > > Also, that para already mentions that the input can be a > comma-separated list when appropriate, so your add-on para seems > partially repetitive. I think you could just drop the first > sentence of it. Agreed, updated patch attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --C+A94P0aj0ebtu9x Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="alter_system.diff" diff --git a/doc/src/sgml/ref/alter_system.sgml b/doc/src/sgml/ref/alter_system.sgml index 6f8bd39eaf..bea5714ba1 100644 --- a/doc/src/sgml/ref/alter_system.sgml +++ b/doc/src/sgml/ref/alter_system.sgml @@ -21,7 +21,7 @@ PostgreSQL documentation -ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' | DEFAULT } +ALTER SYSTEM SET configuration_parameter { TO | = } { value [, ...] | DEFAULT } ALTER SYSTEM RESET configuration_parameter ALTER SYSTEM RESET ALL @@ -83,9 +83,17 @@ ALTER SYSTEM RESET ALL New value of the parameter. Values can be specified as string constants, identifiers, numbers, or comma-separated lists of these, as appropriate for the particular parameter. + Values that are neither numbers nor valid identifiers must be quoted. DEFAULT can be written to specify removing the parameter and its value from postgresql.auto.conf. + + + For some list-accepting parameters, quoted values will produce + double-quoted output to preserve whitespace and commas; for others, + double-quotes must be used inside single-quoted strings to get + this effect. + --C+A94P0aj0ebtu9x--