Re: [PATCH] Add roman support for to_number function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Add roman support for to_number function
Дата
Msg-id 3256645.1737423685@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Add roman support for to_number function  (Maciek Sakrejda <m.sakrejda@gmail.com>)
Список pgsql-hackers
Maciek Sakrejda <m.sakrejda@gmail.com> writes:
> V7 passes check-world here. But, just for kicks, I generated all
> possible 7-character sequences of Roman digits [1] to confirm whether
> everything either parsed cleanly or errored cleanly. Reviewing the
> output, I noticed that to_number accepts some dubiously-formatted
> values:
> postgres=# select to_number('mmmdcm', 'RN');
>  to_number
> -----------
>       4400
> (1 row)

Ugh.  This makes more urgent my question about where roman_to_int's
algorithm came from, because there's evidently something not right
about it.

            regards, tom lane



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