| From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
|---|---|
| To: | skatkovsky(at)gmail(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: BPCHAR description in 8.3. Character Types is misleading and incomplete |
| Date: | 2025-10-15 17:14:46 |
| Message-ID: | e9ad2cb03195402a96e8cb9130470bfca3bf49c7.camel@j-davis.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 | Content-Type | Size |
|---|---|---|
| bpchar-doc.patch | text/x-patch | 926 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alpha Shuro | 2025-10-15 19:07:27 | [DOCS] document ShareLock behaviour when using a deferred unique index |
| Previous Message | PG Doc comments form | 2025-10-14 12:14:53 | BPCHAR description in 8.3. Character Types is misleading and incomplete |