Re: char() datatype looses strings of all spaces

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: char() datatype looses strings of all spaces
Дата
Msg-id 20030816223244.B78105-100000@megazone.bigpanda.com
обсуждение исходный текст
Ответ на char() datatype looses strings of all spaces  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
On Sat, 16 Aug 2003, Joe Conway wrote:

> I stumbled across this behavior today and it seems strange if not a bug:
>
> -- this seems wrong
> vsconf=# create table foo (f1 char(1));
> CREATE TABLE
> vsconf=# insert into foo values(' ');
> INSERT 9002011 1
> vsconf=# select ascii(f1) from foo;
>   ascii
> -------
>       0
> (1 row)

I think the reason for this is that ascii is actually
defined ascii(text) and the conversion from char(n)
to text now drops the trailing spaces.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: char() datatype looses strings of all spaces
Следующее
От: Andreas Pflug
Дата:
Сообщение: Re: Stuff that doesn't work yet in IPv6 patch