Re: Getting float8 data into cube?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Getting float8 data into cube?
Date: 2002-11-18 18:08:49
Message-ID: 20021118180849.GB14398@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 17, 2002 at 15:19:54 -0500,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Bruno Wolff III <bruno(at)wolff(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Wheeler 2002-11-18 18:09:07 Re: DBD::PostgreSQL
Previous Message David Wheeler 2002-11-18 18:07:06 Re: DBD::PostgreSQL