Re: CHAR(n) always trims trailing spaces in 7.4

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CHAR(n) always trims trailing spaces in 7.4
Дата
Msg-id 18611.1077059456@sss.pgh.pa.us
обсуждение исходный текст
Ответ на CHAR(n) always trims trailing spaces in 7.4  ("news.postgresql.org" <jlim@natsoft.com.my>)
Ответы Re: CHAR(n) always trims trailing spaces in 7.4  (elein <elein@varlena.com>)
Список pgsql-sql
"news.postgresql.org" <jlim@natsoft.com.my> writes:
> I just discovered the following change to CHAR(n) (taken from varlena.com,
> general bits, issue 62).

The description you quote doesn't appear to have much of anything to do
with the actual behavior of 7.4.

7.4 will trim trailing spaces when converting char(n) to varchar or
text, but the example query does not do that.  It just coerces query
output columns to char(n), and that works the same as it did before.
For instance

regression=# select 'zit'::char(77);                                   bpchar
-------------------------------------------------------------------------------zit
(1 row)

        regards, tom lane


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

Предыдущее
От: "scott.marlowe"
Дата:
Сообщение: Re: Function
Следующее
От: elein
Дата:
Сообщение: Re: CHAR(n) always trims trailing spaces in 7.4