| From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
|---|---|
| To: | 44973863(at)qq(dot)com |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH] Doc: Mention OFF as an alias for EXPLAIN SERIALIZE NONE |
| Date: | 2026-06-08 02:51:04 |
| Message-ID: | 20260608.115104.1546503424691983310.horikyota.ntt@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
At Sun, 7 Jun 2026 11:28:51 +0800, "ZizhuanLiu X-MAN" <44973863(at)qq(dot)com> wrote in
> I confirmed the equivalence between OFF and NONE via the following tests:
> ```sql
> explain (ANALYZE true, SERIALIZE off ) select * from pg_catalog.pg_stat_lock;
> explain (ANALYZE true, SERIALIZE none) select * from pg_catalog.pg_stat_lock;
> ```
> Both statements execute identically with consistent runtime behavior.
>
> To keep this patch minimal and focused, I leave the enum, tab completion and
> regression tests unchanged for now. This patch simply adds a note to the
> documentation stating that OFF is a valid alias for NONE. Any remaining
> inconsistencies can be addressed in separate follow-up patches later.
>
>
> Reviews, comments and feedback are all welcome.
Personally, I'm not sure this is worth documenting.
Some enum-valued options accept boolean-style representations that are
not mentioned in the documentation. In some cases this is simply an
implementation detail, while in others it is provided as a convenience
or for consistency with existing conventions.
For example, the documentation for the enum-valued GUC parameter
synchronous_commit describes the meaningful settings as "on", "off",
"local", "remote_write", and "remote_apply". It also accepts "1" and
"0", though those are not documented. The same applies to SQL-level
options such as those used in CREATE SUBSCRIPTION WITH (...). However,
I don't think it would be particularly helpful to add "1" and "0" to
the documentation.
Coming back to SERIALIZE, I see OFF in much the same way: it seems
more like a convenience alias than a distinct option that users need
to know about. For that reason, I don't feel there is much value in
documenting it explicitly.
That said, I can see a somewhat stronger case for documenting OFF here
than for documenting boolean-style aliases such as 0 and 1. Since
SERIALIZE otherwise takes enum-style values (NONE, TEXT, and BINARY),
seeing OFF may leave readers wondering whether it has a meaning
distinct from NONE.
Even so, if we do decide to mention it, the proposed wording feels a
bit heavy to me. Something like "SERIALIZE NONE (or OFF)" would
probably be sufficient.
Regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Pavel Stehule | 2026-06-08 02:57:02 | experiment: psql: highlight first row of INFO output |
| Previous Message | Michael Paquier | 2026-06-08 01:36:29 | Re: bugfix - fix broken output in expanded aligned format, when data are too short |