Re: [HACKERS] Add Roman numeral conversion to to_number - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [HACKERS] Add Roman numeral conversion to to_number
Date
Msg-id b1dc5f08-47dc-8a43-3147-372bba169fc3@2ndquadrant.com
Whole thread Raw
In response to Re: [HACKERS] Add Roman numeral conversion to to_number  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Add Roman numeral conversion to to_number  (Merlin Moncure <mmoncure@gmail.com>)
Re: [HACKERS] Add Roman numeral conversion to to_number  (Christoph Berg <myon@debian.org>)
List pgsql-hackers
On 8/3/17 13:45, Robert Haas wrote:
> On Thu, Aug 3, 2017 at 9:25 AM, Oliver Ford <ojford@gmail.com> wrote:
>> Adds to the to_number() function the ability to convert Roman numerals
>> to a number. This feature is on the formatting.c TODO list. It is not
>> currently implemented in either Oracle, MSSQL or MySQL so gives
>> PostgreSQL an edge :-)
> I kind of put my head in my hands when I saw this.  I'm not really
> sure it's worth complicating the code for something that has so little
> practical utility, but maybe other people will feel differently.

I can't get excited about it.  to_number() and such usually mirror the
Oracle implementation, so having something that is explicitly not in
Oracle goes a bit against its mission.

One of the more interesting features of to_number/to_char is that it has
a bunch of facilities for formatting decimal points, leading/trailing
zeros, filling in spaces and signs, and so on.  None of that applies
naturally to Roman numerals, so there isn't a strong case for including
that into these functions, when a separate function or module could do.

There are probably a bunch of Perl or Python modules that can be
employed for this.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] Foreign tables privileges not shown ininformation_schema.table_privileges
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Foreign tables privileges not shown in information_schema.table_privileges