From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: floating point representation |
Date: | 2001-02-19 15:22:57 |
Message-ID: | 200102191522.KAA26517@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> > The 7.1-release seems near.
> > May I provide the followings ?
> > SET FLOAT4_PRECISION TO ..
> > SET FLOAT8_PRECISION TO ..
>
> > Or must we postpone to fix it ?
>
> This seems a small enough change that I do not fear fixing it at this
> late date. However, I do not like the idea of making the SET variables
> be just number of digits precision. As long as we're going to have SET
> variables, let's go for the full flexibility offered by sprintf: define
> the SET variables as the sprintf format strings to use. The defaults
> would be "%.7g" and "%.17g" (or thereabouts, not sure what number of
> digits we are currently using). This way, someone could select the C99
> %a format if he knew that his libc supported it. Or he could force a
> particular format like %7.3f if that's what he needed in a specific
> application.
Added to TODO:
* Add SET FLOAT4_PRECISION and SET FLOAT8_PRECISION using printf args
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-02-19 15:29:52 | Re: AW: Re: beta5 ... |
Previous Message | Bruce Momjian | 2001-02-19 15:08:29 | Re: AW: Re: beta5 ... |