Bug in concat operator for Char?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Bug in concat operator for Char?
Дата
Msg-id 200407201100.53238.josh@agliodbs.com
обсуждение исходный текст
Ответы Re: Bug in concat operator for Char? -- More Info
Список pgsql-bugs
People,

Severity:  Serious Annoyance
Reproducable on:  7.4.1, 7.4.3, 7.5devel
Summary:  Concatination of CHAR() data type field seems to result in a TEXT
value instead of a CHAR value.   Is there a reason for this?

Example:
webmergers=> select '"'::char(4) || ''::char(4) || '"'::char(4);
 ?column?
----------
 ""
(1 row)

Depending on the spec, it seems to me that the above should result either in a
char(4) of "  " or a char(12) of "       "   .   But we get a text value.
Is this the SQL spec?   Is there another reason for this behavior?

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #1198: Linux PostgreSQL Server Input Validation Vulnerability
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Bug in concat operator for Char? -- More Info