Re: [BUGS] Unnexpected results using to_number()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] Unnexpected results using to_number()
Дата
Msg-id 29058.963164332@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Re: [BUGS] Unnexpected results using to_number()  (Karel Zak <zakkr@zf.jcu.cz>)
Список pgsql-hackers
"Andrew Snow" <andrew@modulus.org> writes:
> # SELECT to_number('12,454.8-', '');
> pqReadData() -- backend closed the channel unexpectedly.

In current sources I get a NULL result, which seems to be what the
code author intended originally.  However this seems a little bit
inconsistent --- shouldn't it raise a bad-format error instead?
For example,

regression=#  SELECT to_number('12,454.8-', ' ');
ERROR:  Bad numeric input format ' '

Seems odd that no spaces means "return NULL" but 1 or more spaces
doesn't.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: C language function dump problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug list?