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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CHAR(n) always trims trailing spaces in 7.4
Дата
Msg-id 8636.1077221181@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CHAR(n) always trims trailing spaces in 7.4  (elein <elein@varlena.com>)
Список pgsql-sql
elein <elein@varlena.com> writes:
> Somewhere the space trimming occurs.

The cast from char(n) to text (or varchar) is what's doing the trimming
in 7.4.  I think you can mostly revert the change by changing that
pg_cast entry to specify no conversion function instead of rtrim().
However that would probably result in squirrely, non-spec behavior for
comparisons.

> If char(n) is properly defined to not trim spaces then
> there should be a separate cat for char(n).

Possibly, but I think that is considering the issue much too narrowly.
Concatenation is not the only textual operator.
        regards, tom lane


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

Предыдущее
От: "Jeremy Smith"
Дата:
Сообщение: Re: DISTINCT ON troubles
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Compiling pl/pgsql functions