b.wood@niwa.co.nz writes:
> According to the docs
> http://www.postgresql.org/docs/9.3/static/datatype-character.html)(:
> " If the string to be stored is shorter than the declared length, values of
> type character will be space-padded; values of type character varying will
> simply store the shorter string."
Quite.
> Yet chars are not being padded
Yes they are. You are neglecting the fact that a coercion from char to
varchar/text strips trailing blanks, so that a test like this:
> fish=# select var3||':' as var3, cha3||':' as char3 from test;
proves nothing at all about how many trailing spaces there were in
cha3.
regards, tom lane