public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Laurenz Albe <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date: Fri, 17 Oct 2025 09:14:51 -0400
Message-ID: <CAKFQuwa512gkrMHP9+mSMYKQh1qMxVaOPWFthmKPQ9ysL9JzNQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Friday, October 17, 2025, Laurenz Albe <[email protected]> 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.


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], [email protected]
  Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
  In-Reply-To: <CAKFQuwa512gkrMHP9+mSMYKQh1qMxVaOPWFthmKPQ9ysL9JzNQ@mail.gmail.com>

* 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