| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
| Cc: | Sergei Katkovsky <skatkovsky(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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-16 18:40:36 |
| Message-ID: | CAKFQuwb8Qh2akZKV-yieee-rdVQ0-faZRAzxVvbfw2SdKACXaA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Thursday, October 16, 2025, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> On Thu, 2025-10-16 at 08:36 -0400, David G. Johnston wrote:
> > A given value has a finite length and there is just no restriction on
> > what that length is. All trailing spaces in the input are considered
> > padding for purposes of comparison i.e., manually padding is added by
> > the user as opposed to the system.
>
> I see -- so it means that the padding came from somewhere else (not the
> type).
>
Yeah, your original conclusion this couldn’t be labeled blank-padded seems
to have drawn this confusion. If padding is indeed noun-like and not
verb-like then calling it blank-padded works ok. The clarifying text is
then just fine as-is: the comment about any included spaces are
semantically insignificant ties back to calling those spaces “padding” and
thus the type itself remains “blank-padded” in both the and N and non-N
cases. There isn’t a way to make “trimmed” a noun here but those spaces
are not actually removed/trimmed away.
In short, I would change trimmed to padded in the table.
I’d also add “padding” here just to actually use the word in its noun form.
…but trailing spaces are [stored as] semantically insignificant [padding].
(I thought also about trying to remove the phrase “semantically
[in]significant” altogether but at the moment would rather not touch the
following paragraph.)
If we really have to drive the point home I'd also add a footnote marker to
“blank-padded” and then say in the footnote text (right below the table):
A blank-padded value contains zero or more trailing spaces which are
ignored for comparison purposes. These spaces are also called
“semantically insignificant”.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sergei Katkovsky | 2025-10-16 19:00:04 | Re: BPCHAR description in 8.3. Character Types is misleading and incomplete |
| Previous Message | David G. Johnston | 2025-10-16 18:11:10 | BPCHAR description in 8.3. Character Types is misleading and incomplete |