1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

The attached patch provides cube with 4 functions for building cubes

directly from float8 values. (As opposed to converting the values to
strings
and then parsing the strings.)
The functions are:
cube(float8) returns cube
cube(float8,float8) returns cube
cube(cube,float8) returns cube
cube(cube,float8,float8) returns cube

Bruno Wolff III
This commit is contained in:
Bruce Momjian
2003-02-13 05:26:50 +00:00
parent f249daf9b7
commit 80b3513d57
5 changed files with 205 additions and 17 deletions

View File

@ -92,6 +92,24 @@ SELECT '1 e7'::cube AS cube; -- 6
SELECT '1,2a'::cube AS cube; -- 7
SELECT '1..2'::cube AS cube; -- 7
--
-- Testing building cubes from float8 values
--
SELECT cube(0::float8);
SELECT cube(1::float8);
SELECT cube(1,2);
SELECT cube(cube(1,2),3);
SELECT cube(cube(1,2),3,4);
SELECT cube(cube(cube(1,2),3,4),5);
SELECT cube(cube(cube(1,2),3,4),5,6);
--
-- Test that the text -> cube cast was installed.
--
SELECT '(0)'::text::cube;
--
-- Testing limit of CUBE_MAX_DIM dimensions check in cube_in.
--