Re: Bug on CHARACTER(n) ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug on CHARACTER(n) ?
Дата
Msg-id 12568.1133198398@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Bug on CHARACTER(n) ?  (Stefano Reksten <sreksten@sdb.it>)
Список pgsql-bugs
Stefano Reksten <sreksten@sdb.it> writes:
> SELECT length(name), name from test;
>   length |    name
> --------+------------
>        4 | test

> Should not a char(10) insert 6 padding spaces?

It does, as you can see in the above output; but the padding spaces are
considered semantically insignificant and are therefore ignored by
length() and by concatenation.  If you think that trailing spaces are
meaningful data, then use varchar(n) or text.

            regards, tom lane

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

Предыдущее
От: Pawel Bernat
Дата:
Сообщение: Re: Bug on CHARACTER(n) ?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: segfault of autovacuum process during restore - coredumps included