On Sat, Feb 12, 2022 at 1:01 AM Shinoda, Noriyoshi (PN Japan FSIP)
<noriyoshi.shinoda@hpe.com> wrote:
> Thank you for developing a great feature.
> The current help message shown below does not seem to be able to specify the 'client-' or 'server-' for lz4
compression.
> --compress = {[{client, server}-]gzip, lz4, none}[:LEVEL]
>
> The attached small patch fixes the help message as follows:
> --compress = {[{client, server}-]{gzip, lz4}, none}[:LEVEL]
Hmm. After studying this a bit more closely, I think this might
actually need a bit more revision than what you propose here. In most
places, we use vertical bars to separate alternatives:
-X, --wal-method=none|fetch|stream
But here, we're using commas in some places and the word "or" in one
case as well:
-Z, --compress={[{client,server}-]gzip,lz4,none}[:LEVEL] or [LEVEL]
We're also not consistently using braces for grouping, which makes the
order of operations a bit unclear, and it makes no sense to put
brackets around LEVEL when it's the only thing that's part of that
alternative.
A more consistent way of writing the supported syntax would be like this:
-Z, --compress={[{client|server}-]{gzip|lz4}}[:LEVEL]|LEVEL|none}
I would be somewhat inclined to leave the level-only variant
undocumented and instead write it like this:
-Z, --compress={[{client|server}-]{gzip|lz4}}[:LEVEL]|none}
--
Robert Haas
EDB: http://www.enterprisedb.com