Getting float8 data into cube? - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Getting float8 data into cube?
Date
Msg-id 20021117195938.GA6061@wolff.to
Whole thread Raw
Responses Re: Getting float8 data into cube?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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.

Currently this can be poorly done using text as an intermediate type.
As far as I can tell functions can't take sets as arguments. Arrays
seem to suffer from similar problems as the cube type, so that preloading
an array with the output of a few calculations isn't particularly easy
unless you use text as an intermediate type.

One possibility would be to have a function that adds one dimension
on to an existing cube. This could be used recursively to build up a
cube with desired number of dimensions. It may not gain much in speed, but
would be more accurrate without having to adjust extra_float_digits.

Is there some better approach that I have overlooked?


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] DECLARE CURSOR
Next
From: Alvaro Herrera
Date:
Subject: Re: pg_stat_database shows userid as OID