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:
@ -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.
|
||||
--
|
||||
|
Reference in New Issue
Block a user