public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Sergei Katkovsky <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: [email protected]
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date: Thu, 23 Oct 2025 08:02:21 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<CAAf8JyLJDtbBnx7zc_oPb=16YAHH0PyAh5H_GtZ7R0QJPqthNQ@mail.gmail.com>
	<[email protected]>
	<CAAf8JyKpZY+bWLmyP-hR+sQiR0yS+nDTrdqaQbWgrf6uxsXYoQ@mail.gmail.com>
	<[email protected]>

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


Attachments:

  [text/x-patch] v1-0001-Improve-doc-for-bpchar-without-length-limit.patch (1.6K, 2-v1-0001-Improve-doc-for-bpchar-without-length-limit.patch)
  download | inline diff:
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



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox