On Mon, 2025-10-20 at 16:22 +0200, Laurenz Albe wrote: > > Looks like nobody is against "insignificant/ignorable trailing > > whitespace" or anything like that anymore? Am I right? > > Any verbal description will never completely represent the facts. > But I'd say that "ignores trailing blanks" (not tabs, for example) > is a fairly accurate description.
Here is a patch along these lines. Yours, Laurenz Albe
From eb7160f4e22777bb9c70f660da2ff4f72792c499 Mon Sep 17 00:00:00 2001 From: Laurenz Albe <[email protected]> Date: Thu, 23 Oct 2025 08:00:08 +0300 Subject: [PATCH v1] Improve doc for bpchar without length limit The documentation stated that "bpchar" was "blank trimmed", which sounds like blanks are removed, but they aren't. Rather, trailing blanks get ignored by most operations. Author: Jeff Davis <[email protected]> Author: Laurenz Albe <[email protected]> Reported-By: Sergei Katkovsky <[email protected]> Discussion: https://postgr.es/m/176044409338.770.16064383081308443747%40wrigleys.postgresql.org --- doc/src/sgml/datatype.sgml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index b81d89e2608..ad7ee225973 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1178,7 +1178,7 @@ SELECT '52093.89'::money::numeric::float8; </row> <row> <entry><type>bpchar</type></entry> - <entry>variable unlimited length, blank-trimmed</entry> + <entry>variable unlimited length, ignores trailing blanks</entry> </row> <row> <entry><type>text</type></entry> @@ -1298,7 +1298,7 @@ SELECT '52093.89'::money::numeric::float8; <tip> <para> - There is no performance difference among these three types, + There is no performance difference among these four types, apart from increased storage space when using the blank-padded type, and a few extra CPU cycles to check the length when storing into a length-constrained column. While -- 2.51.0
