Re: [PATCH] Add roman support for to_number function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Add roman support for to_number function
Date
Msg-id 3256645.1737423685@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Add roman support for to_number function  (Maciek Sakrejda <m.sakrejda@gmail.com>)
List 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 by date:

Previous
From: Jeremy Schneider
Date:
Subject: Re: New feature request for adding session information to PostgreSQL transaction log
Next
From: Tom Lane
Date:
Subject: Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options