BUG #3561: CHAR(x) blank stripped. Server or documentation bug?

Поиск
Список
Период
Сортировка
От Alexander Kirpa
Тема BUG #3561: CHAR(x) blank stripped. Server or documentation bug?
Дата
Msg-id 200708210857.l7L8v5CZ091446@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #3561: CHAR(x) blank stripped. Server or documentation bug?
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      3561
Logged by:          Alexander Kirpa
Email address:      postgres@bilteks.com
PostgreSQL version: 8.2.4
Operating system:   FreeBSD 6.2
Description:        CHAR(x) blank stripped. Server or documentation bug?
Details:

Regarding
http://www.postgresql.org/docs/8.2/interactive/datatype-character.html
char(n) - fixed-length, blank padded
In live:
CREATE TABLE test1 (a character(6),b varchar(6));
INSERT INTO test1 VALUES ('ok','ok');
INSERT INTO test1 VALUES (' bad ',' bad ');
INSERT INTO test1 VALUES ('  poor','  poor');
select '['||a||']' as aa,'['||b||']' as bb from test1;
INSERT INTO test1 VALUES ('ok','ok');
INSERT INTO test1 VALUES (' bad ',' bad ');
INSERT INTO test1 VALUES ('  poor','  poor');
select '['||a||']' as aa,'['||b||']' as bb from test1;
    aa    |    bb
----------+----------
 [ok]     | [ok]
 [ bad]   | [ bad ]
 [  poor] | [  poor]
(3 rows)
It is easy to see that char(x) field really blank stripped.
This is bug of server or documentation?

Best regards,
 Alexander Kirpa

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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BUG #3558: Comunication cut after 5 mins aprox. in remote acces to Postgres
Следующее
От: Gregory Stark
Дата:
Сообщение: Re: BUG #3561: CHAR(x) blank stripped. Server or documentation bug?