Re: Getting float8 data into cube?
От | Bruno Wolff III |
---|---|
Тема | Re: Getting float8 data into cube? |
Дата | |
Msg-id | 20021118180849.GB14398@wolff.to обсуждение исходный текст |
Ответ на | Re: Getting float8 data into cube? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Getting float8 data into cube?
|
Список | pgsql-hackers |
On Sun, Nov 17, 2002 at 15:19:54 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Bruno Wolff III <bruno@wolff.to> writes: > > For 7.4 I would like to add a function for importing float8 values > > into cube. But because the cube data type is variable length I am > > not sure what a good approach would be. > > I'm not clear on what you want to accomplish. How are you expecting > the source data to be structured? > > regards, tom lane I would like to get the results of floating point calculations into a cube without losing precision because float output is trunctated at 15 digits. In 7.4 I will have the option to change extra_float_digits while loading data into cubes, but that seems like a hack. My particular case will be converting latitude and longitude to 3D cartesian coordinates. With the calculations truncated at 15 digits, I can sometimes see round off error after going back to latitude and longitude. The accurracy itself isn't a big deal, it is more seeing the .0000001 or .999999 at the end of the numbers that is annoying. This could also be handled by further rounding. It also seems like there should be a way to get floating point data into cube without losing precision.
В списке pgsql-hackers по дате отправления: