Re: BUG #17258: Unexpected results in CHAR(1) data type - Mailing list pgsql-bugs

From Mark Dilger
Subject Re: BUG #17258: Unexpected results in CHAR(1) data type
Date
Msg-id 6DEAC128-6F16-468A-8BB3-5A3062FFCC57@enterprisedb.com
Whole thread Raw
In response to Re: BUG #17258: Unexpected results in CHAR(1) data type  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-bugs

> On Oct 29, 2021, at 3:09 PM, Mark Dilger <mark.dilger@enterprisedb.com> wrote:
>
> most of the functionality involving char(n)

...

> and those functions that do directly take a bpchar type for comparison purposes trigger the "semantically
insignificantand disregarded" bit 

I meant the "most of the functionality" qualifier to apply to the second part, meaning "most of the functions that
do..."but on re-reading, my grammar didn't accomplish that.  I now understand why David Johnston corrected me here: 

> On Oct 29, 2021, at 3:13 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> As I noted in a prior reply, octet_length(char) does the length computation with the padding spaces.  So it is
possiblefor char input functions to do the expected thing. 

You are correct, sir.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






pgsql-bugs by date:

Previous
From: Kamigishi Rei
Date:
Subject: Re: BUG #17245: Index corruption involving deduplicated entries
Next
From: "David M. Calascibetta"
Date:
Subject: RE: BUG #17258: Unexpected results in CHAR(1) data type