| From: | Fujii Masao <fujii(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add HINT listing valid encodings to encode() and decode() errors |
| Date: | 2025-11-20 00:15:10 |
| Message-ID: | E1vLsKM-000NWw-0Q@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Add HINT listing valid encodings to encode() and decode() errors.
This commit updates encode() and decode() so that when an invalid encoding
is specified, their error message includes a HINT listing all valid encodings.
This helps users quickly see which encodings are supported without needing
to consult the documentation.
Author: Shinya Sugamoto <shinya34892(at)gmail(dot)com>
Reviewed-by: Chao Li <lic(at)highgo(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Reviewed-by: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAAe3y+99sfPv8UDF1VM-rC1i5HBdqxUh=2HrbJJFm2+i=1OwOw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/99780da7209605bf9f226eac3eac30ab2bc9427c
Modified Files
--------------
src/backend/utils/adt/encode.c | 8 ++++++--
src/test/regress/expected/strings.out | 7 +++++++
src/test/regress/sql/strings.sql | 4 ++++
3 files changed, 17 insertions(+), 2 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2025-11-20 00:21:12 | pgsql: doc: Update pg_upgrade documentation to match recent description |
| Previous Message | Thomas Munro | 2025-11-19 21:39:59 | pgsql: Drop support for MSVCRT's float formatting quirk. |