I was just trying to show more junior programmers the difference between the 'assumed' padded char and the more modern 'trimming' varchar So imagine my surprise when both length() and concatenation() yielded the exactly opposite behavior than expected!
For such pedagogic purpose you can use:
select length(cast('A' as char(4))::bytea)
But you then have to explain the ::bytea trick :-)