The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/9.6/static/datatype-character.html Description:
removing trailing spaces on (implicit) cast from char to text can be painful, and always surprising as shown in example with SELECT 'a '::CHAR(2) collate "C" < E'a\n'::CHAR(2) would it be worth mentioning a tip, that this behaviour can be monkey hacked by concat(str "any" function that accepts char and returns text, thus respecting the spaces, eg SELECT concat('a '::CHAR(2) collate "C") < E'a\n'::CHAR(2) will return false as expected... -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs