Re: BPCHAR description in 8.3. Character Types is misleading and incomplete

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Davis <pgsql(at)j-davis(dot)com>, "skatkovsky(at)gmail(dot)com" <skatkovsky(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date: 2025-10-17 13:14:51
Message-ID: CAKFQuwa512gkrMHP9+mSMYKQh1qMxVaOPWFthmKPQ9ysL9JzNQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Friday, October 17, 2025, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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.

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2025-10-17 13:46:02 Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Previous Message Laurenz Albe 2025-10-17 12:49:12 Re: BPCHAR description in 8.3. Character Types is misleading and incomplete