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

From David G. Johnston
Subject Re: BUG #17258: Unexpected results in CHAR(1) data type
Date
Msg-id CAKFQuwbF9=HD+nBxYX4QfMEA68zSNz_OdUqpW-dQDDdotp08kg@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17258: Unexpected results in CHAR(1) data type  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: BUG #17258: Unexpected results in CHAR(1) data type  (Mark Dilger <mark.dilger@enterprisedb.com>)
List pgsql-bugs
On Fri, Oct 29, 2021 at 3:09 PM Mark Dilger <mark.dilger@enterprisedb.com> wrote:
and those functions that do directly take a bpchar type for comparison purposes trigger the "semantically insignificant and disregarded" bit.  For practical purposes you will frequently hit the one bit or the other. 


As I noted in a prior reply, octet_length(char) does the length computation with the padding spaces.  So it is possible for char input functions to do the expected thing.

David J.

pgsql-bugs by date:

Previous
From: Mark Dilger
Date:
Subject: Re: BUG #17258: Unexpected results in CHAR(1) data type
Next
From: Mark Dilger
Date:
Subject: Re: BUG #17258: Unexpected results in CHAR(1) data type