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

From Jeff Davis
Subject Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Date
Msg-id e9ad2cb03195402a96e8cb9130470bfca3bf49c7.camel@j-davis.com
Whole thread Raw
In response to BPCHAR description in 8.3. Character Types is misleading and incomplete  (PG Doc comments form <noreply@postgresql.org>)
Responses Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
Re: BPCHAR description in 8.3. Character Types is misleading and incomplete
List pgsql-docs
On Tue, 2025-10-14 at 12:14 +0000, PG Doc comments form wrote:
> The description of BPCHAR in section 8.3. Character Types is
> misleading and
> incomplete.

Hi,

There was a previous discussion here:

https://www.postgresql.org/message-id/E1odZyZ-0000g2-AE%40gemulon.postgresql.org

> The first problem is that, contrary to table 8.4, BPCHAR is not
> actually
> blank-trimmed. The wording "as-if-blank-trimmed" or "blank-ignoring"
> may be
> better suited here. The following query explains the problem:

Correct, it does not actually trim the blanks before storing. The
paragraph below the table clarifies: "If bpchar lacks a length
specifier, it also accepts strings of any length, but trailing spaces
are semantically insignificant."

I think "blank-insignificant" is slightly better than "blank-ignoring".

> The second problem is that 'Tip' before the example 8.1 mentions only
> three
> types, also in a misleading way: 'There is no performance difference
> among
> these three types' - as if there were only 3, not 4 distinct types.

Thank you.

Please take a look at the attached patch. If you'd like your name
included in the commit, please send it as you'd like it to appear.

Regards,
    Jeff Davis


Attachment

pgsql-docs by date:

Previous
From: PG Doc comments form
Date:
Subject: BPCHAR description in 8.3. Character Types is misleading and incomplete
Next
From: Alpha Shuro
Date:
Subject: [DOCS] document ShareLock behaviour when using a deferred unique index