Re: BPCHAR description in 8.3. Character Types is misleading and incomplete - Mailing list pgsql-docs

From David G. Johnston
Subject Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date
Msg-id CAKFQuwa512gkrMHP9+mSMYKQh1qMxVaOPWFthmKPQ9ysL9JzNQ@mail.gmail.com
Whole thread Raw
In response to Re: BPCHAR description in 8.3. Character Types is misleading and incomplete  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-docs
On Friday, October 17, 2025, Laurenz Albe <laurenz.albe@cybertec.at> wrote:

I suggest the following simplification:

+        <entry><type>text</type>, <type>varchar</type>, <type>bpchar</type></entry>


Calling bpchar an alias of text/varchar does not improve matters.  Sure, the type itself doesn’t actually care about trailing spaces, but in practice operations on bpchar values do not behave the same as those on text values.

select '123  '::bpchar = '123        '::bpchar; // true

David J.

pgsql-docs by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Next
From: "David G. Johnston"
Date:
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete