Re: WIP: to_char, support for EEEE format

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-08 07:45:09
Message-ID: 37ed240d0908080045g4700939eg86995c80a43f74b8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2009/8/3 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Uh, no, we had better support more.  The actual limit of the current
> numeric format is 1e+131072.
>

Given your comment above I'm thinking it reasonable to use an int32 to
store the exponent -- will that be safe?

That would allow for a maximum of 10 exponent digits. As an aside, I
note that int4out() hardcodes the maximum number of digits rather than
exposing a constant (c.f. MAXINT8LEN in int8.c). I'm considering
adding MAXINT2LEN and MAXINT4LEN to int.c in passing. Excessive
tinkering, or worthy improvement?

Cheers,
BJ

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2009-08-08 08:30:36 Re: Split-up ECPG patches
Previous Message Robert Haas 2009-08-08 04:17:45 Re: Alpha releases: How to tag