public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Sergei Katkovsky <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Jeff Davis <[email protected]>
Cc: [email protected] <[email protected]>
Subject: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date: Thu, 16 Oct 2025 14:11:10 -0400
Message-ID: <CAKFQuwbfQ_uP+vot0ys_wo4cS6ZCpn=aZxhVGZ-tt_4HB7CVHw@mail.gmail.com> (raw)
In-Reply-To: <CAAf8JyLQp-u+nToXQZBasTHg4mj8YuWvX2bPkt_rvrDfHiW0qg@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAAf8JyJNWf9BrpBJNpqEwTM7orbR48XenoALAE8icA68kaC5Wg@mail.gmail.com>
	<CAKFQuwZJhDgg_WqWq7HMAUd7bGiU4r-VFVXn72Hfq9VQhRKZMw@mail.gmail.com>
	<CAAf8JyLQp-u+nToXQZBasTHg4mj8YuWvX2bPkt_rvrDfHiW0qg@mail.gmail.com>

On Thursday, October 16, 2025, Sergei Katkovsky <[email protected]>
wrote:


> Manual addition is not padding, If it were, then VARCHAR would also be
> "blank-padded", because you can manually add trailing blanks to values
> of this type too. But of course it isn't.
>

The spaces added to the end of a bpchar manually can and are considered
“padding” - or “present but lack semantic/value significance”. The reason
they are not padding for varchar is that such spaces are considered part of
the stored value from a semantic perspective.

Think of padding as a noun, not a verb.  “The value contains padding”.
Not, “ I am padding the value”.

And yes, this is intended as a way to make the name of the type and its
behavior consistent.  You sorta have to want it to work/make sense; not
fight it on minor nuance.

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]
  Subject: Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
  In-Reply-To: <CAKFQuwbfQ_uP+vot0ys_wo4cS6ZCpn=aZxhVGZ-tt_4HB7CVHw@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