Re: WIP: to_char, support for EEEE format

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: to_char, support for EEEE format
Дата
Msg-id 14529.1248972403@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: to_char, support for EEEE format  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: WIP: to_char, support for EEEE format  (Robert Haas <robertmhaas@gmail.com>)
Re: WIP: to_char, support for EEEE format  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> 2009/7/30 Robert Haas <robertmhaas@gmail.com>:
>> On Thu, Jul 30, 2009 at 10:35 AM, Brendan Jurd<direvus@gmail.com> wrote:
>>> Hmm. For what it's worth, I think Pavel makes a good point about the
>>> number of exponent digits -- a large chunk of the use case for numeric
>>> formatting would be fixed-width reporting.

+1.  If you aren't trying to get the format exactly so, it's not clear
why you're bothering with to_char() at all.

> Maybe we should to support some modificator like Large EEEE - LEEEE or EEEEE

Five (or more?) E's seems like a natural extension to me.  However, that
still leaves us with the question of what to do when the exponent
doesn't fit in however many digits we'd like to print.  Seems like the
options are* print #'s* force the output wider* throw an error
None of these are very nice, but the first two could cause problems that
you don't find out until it's too late to fix.  What about throwing an
error?

Sorry if this was already covered in the thread, but: anybody know what
Oracle does for this?
        regards, tom lane


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

Предыдущее
От: Brendan Jurd
Дата:
Сообщение: Re: WIP: to_char, support for EEEE format
Следующее
От: Joe Conway
Дата:
Сообщение: Re: CommitFest Status Summary - 2009-07-25