Skip site navigation (1) Skip section navigation (2)

Re: WIP: to_char, support for EEEE format

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: to_char, support for EEEE format
Date: 2009-07-30 17:02:31
Message-ID: 603c8f070907301002h7acbedf1j186f76de6cb764b5@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, Jul 30, 2009 at 12:46 PM, Tom Lane<tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2009/7/30 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>> On Thu, Jul 30, 2009 at 10:35 AM, Brendan Jurd<direvus(at)gmail(dot)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

The tricky thing here is that there are two independent parameters
here - the MINIMUM number of exponent digits you want (which might be
1, 2, 3, or more), and the MAXIMUM number of exponent digits you want
(which might be the same as minimum, or a larger number, or infinity).

...Robert

In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2009-07-30 17:18:27
Subject: Re: WIP: to_char, support for EEEE format
Previous:From: Joe ConwayDate: 2009-07-30 17:02:11
Subject: Re: CommitFest Status Summary - 2009-07-25

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group