I have a column type text which looks like empty string but the length of it is 1.
the following sql
select
teilnetz_name,
length(teilnetz_name),
trim(teilnetz_name),
length(trim(teilnetz_name))
from test_table
results in
teilnetz_name| length| btrim| length
| 1 | | 1
and
select case when trim(teilnetz_name) is distinct from '' then true else false end
from test_table
--return true
select case when teilnetz_name is distinct from null then true else false end
from test_table
--return true
select case when teilnetz_name is distinct from '' then true else false end
from test_table
--return true
select case when teilnetz_name is distinct from ' ' then true else false end
from test_table
--return true
How can I explain this phenomenon ?
I have on postgreql version 12.3