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

From David G. Johnston
Subject BPCHAR description in 8.3. Character Types is misleading and incomplete
Date
Msg-id CAKFQuwbfQ_uP+vot0ys_wo4cS6ZCpn=aZxhVGZ-tt_4HB7CVHw@mail.gmail.com
Whole thread Raw
In response to Re: BPCHAR description in 8.3. Character Types is misleading and incomplete  (Sergei Katkovsky <skatkovsky@gmail.com>)
Responses Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
List pgsql-docs
On Thursday, October 16, 2025, Sergei Katkovsky <skatkovsky@gmail.com> 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.

pgsql-docs by date:

Previous
From: Jeff Davis
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