The following bug has been logged on the website:
Bug reference: 17258
Logged by: David Calascibetta
Email address: david(at)calascibetta(dot)com
PostgreSQL version: 12.8
Operating system: AWS RDS
Description:
My understanding is that a CHAR(1) column can never be 0 (zero) length.
I expect the results of these two SELECT statements to produce the same
result:
select length(substr(' '::varchar,1,1)), ascii(substr('
'::varchar,1,1));
produces==> 1 32 (as expected)
select length(substr(' '::char,1,1)), ascii(substr(' '::char,1,1));
produces==> 0 0 (not as expected)