From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: to_char, support for EEEE format |
Date: | 2009-08-04 02:49:01 |
Message-ID: | 37ed240d0908031949u1173682ak503d69934d95536a@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/8/4 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Brendan Jurd <direvus(at)gmail(dot)com> writes:
>> Well, I tried this and as it turns out the patch casts the value to a
>> float8 in order to pass it on to snprintf for sci-notation formatting.
>
> Well, that's pretty dumb. Quite aside from the range problem, that
> would mean that you lose everything past the sixteenth or so digit.
> I think that's sufficient grounds for bouncing the patch back for
> rework right there.
>
I agree.
> What I'd consider instead is calling numeric_out and then working
> with the result of that. It would always be f-format, so you'd
> have to do your own conversion to e-format, but you could do it
> without any risk of precision or range loss.
>
Yeah, I figured as much. I'll see what I can do about reworking the
numeric case. I should be able to post a new revision in the next day
or so, but I certainly won't cry foul if this gets punted to
September.
Cheers,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-04 02:53:09 | Re: WIP: to_char, support for EEEE format |
Previous Message | Andrew Dunstan | 2009-08-04 02:44:28 | Re: async notification patch for dblink |