Re: 'value' has special behaviour in alter system

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: splarv(at)ya(dot)ru, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: 'value' has special behaviour in alter system
Date: 2022-12-15 15:50:45
Message-ID: CAKFQuwbefvj25vYz-0KJ-62oCg8-BxAd3PButBZTJ-7PzUcGbQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Dec 15, 2022 at 4:45 AM PG Doc comments form <noreply(at)postgresql(dot)org>
wrote:

> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/15/sql-altersystem.html
> Description:
>
> Documentation say
> ALTER SYSTEM SET configuration_parameter { TO | = } { value | 'value' |
> DEFAULT }
>
> The variant 'value' has special, not obvious behaviour and must be
> documented.
>
>
This syntax representation and accompanying text annoys me too. It is
logical behavior and described accurately, but I think readability could be
improved.

I suggest changing it to:

SET configuration_parameter { TO | = } { value [, ...] | DEFAULT }

Values can be specified as unquoted alphanumeric+underscore sequences. If
the value contains any non-alphanumeric (plus underscore) characters it
should be enclosed in quotes (single or double, it does not matter). For
settings that accept multiple values, separate each value to be supplied
with a comma (and optional whitespace).

This concern is not limited to this page though, and should be applied
elsewhere as is applicable.

I haven't tried to exhaustively enumerate when quoting is required, and
probably the quoting rules should be centralized and the description
simplified to:

The rules for when individual values must be quoted is described in
Chapter 20.1.1. For settings that accept multiple values, separate each
value with a comma and optional whitespace.

That chapter does indeed already explain for each type of value when
quoting is required.

David J.

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Jonathan S. Katz 2022-12-15 16:50:33 Re: 'value' has special behaviour in alter system
Previous Message Nimrod Sadeh 2022-12-15 14:40:34 Re: No multi range functions on version 12