Re: Re: floating point representation - Mailing list pgsql-hackers

From Philip Warner
Subject Re: Re: floating point representation
Date
Msg-id 3.0.5.32.20010221211323.03157970@mail.rhyme.com.au
Whole thread Raw
In response to Re: floating point representation  (Robert Schrem <Robert.Schrem@WiredMinds.de>)
Responses Re: Re: floating point representation  (Robert Schrem <Robert.Schrem@WiredMinds.de>)
Re: Re: floating point representation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 10:19 21/02/01 +0100, Robert Schrem wrote:
>The advantage would be, that we only generate as much ASCII data
>as absolutly neccessary to rebuild the original data exactly.
>At least this is what I would expect from pg_dump.

pg_dump is only one side of thre problem, but the simplest solution might
be to add an option to dump the hex mantissa, exponent & sign. This should
be low-cost and an exact representation of the machine version of the number.

The other issues, like what is sent to psql & via interfaces like odbc
(currently text) should be application/DBA based and setable on a
per-attribute basis. eg. some applications want 1.0000 because the data
came from a piece of hardware with a know error, and 1.0000 means 1.0000+/-
0.00005 etc. Maybe this is just an argument for a new 'number with error'
type...


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: Encoding names
Next
From: Tatsuo Ishii
Date:
Subject: Re: Encoding names