Re: char() datatype looses strings of all spaces

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: char() datatype looses strings of all spaces
Дата
Msg-id 9284.1061098488@sss.pgh.pa.us
обсуждение исходный текст
Ответ на char() datatype looses strings of all spaces  (Joe Conway <mail@joeconway.com>)
Список pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> I stumbled across this behavior today and it seems strange if not a bug:

ascii() is defined as ascii(text).  As of 7.4, bpchar->text conversion
strips trailing blanks, so what ascii() sees is a zero-length string.

Given that trailing blanks are insignificant in bpchar, I'm not sure I'd
call this a bug.  If we decide it is, we could work around it by
creating an ascii(bpchar) entry ... but what's the argument that says
insignificant trailing blanks must map to the same thing as significant
blanks?
        regards, tom lane


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Question with hashed IN
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: char() datatype looses strings of all spaces