inconsistent quoting in error messages

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: inconsistent quoting in error messages
Date: 2024-05-20 07:56:13
Message-ID: 20240520.165613.189183526936651938.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I noticed that there are slightly inconsistent messages regarding
quoting policies.

> This happens if you temporarily set "wal_level=minimal" on the server.
> WAL generated with "full_page_writes=off" was replayed during online backup

> pg_log_standby_snapshot() can only be used if "wal_level" >= "replica"

> WAL streaming ("max_wal_senders" > 0) requires "wal_level" to be "replica" or "logical"

I think it's best to quote variable names and values separately, like
"wal_level" = "minimal" (but not use quotes for numeric values), as it
seems to be the most common practice. Anyway, we might want to unify
them.

Likewise, I saw two different versions of values with units.

> "max_stack_depth" must not exceed %ldkB.
> "vacuum_buffer_usage_limit" must be 0 or between %d kB and %d kB

I'm not sure, but it seems like the latter version is more common.

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-05-20 08:03:20 Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Previous Message Michael Paquier 2024-05-20 07:29:24 Re: State of pg_createsubscriber