[DOCS] tip to workaround trailing spaces removal on char to varcharconversion

Поиск
Список
Период
Сортировка
От vodevsh@gmail.com
Тема [DOCS] tip to workaround trailing spaces removal on char to varcharconversion
Дата
Msg-id 20170920124626.17363.48015@wrigleys.postgresql.org
обсуждение исходный текст
Список pgsql-docs
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

В списке pgsql-docs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [DOCS] Docbook 5.x
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: [DOCS] Docbook 5.x