Re: [HACKERS] Add Roman numeral conversion to to_number

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [HACKERS] Add Roman numeral conversion to to_number
Дата
Msg-id CAHyXU0zyCv0DSZT3AZioKLHnXsa95KrrqeFYawJLAVnN5ZVuGA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Add Roman numeral conversion to to_number  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] Add Roman numeral conversion to to_number  (Doug Doole <DougDoole@gmail.com>)
Список pgsql-hackers
On Mon, Aug 14, 2017 at 2:48 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> 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.

Well, doesn't that also apply to scientific notation (EEEE)?

'RN' is documented as an accepted formatting string, and nowhere does
it mention that it only works for input.  So we ought to allow for it
to be fixed or at least document that it does not work.  It's nothing
but a curio obviously, but it's kind of cool IMO.

merlin



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Re: new set of psql patches for loading (saving) datafrom (to) text, binary files