mirror of
https://github.com/postgres/postgres.git
synced 2025-08-08 06:02:22 +03:00
/contrib/cube improvements:
Update the calling convention for all external facing functions. By external facing, I mean all functions that are directly referenced in cube.sql. Prior to my update, all functions used the older V0 calling convention. They now use V1. New Functions: cube(float[]), which makes a zero volume cube from a float array cube(float[], float[]), which allows the user to create a cube from two float arrays; one for the upper right and one for the lower left coordinate. cube_subset(cube, int4[]), to allow you to reorder or choose a subset of dimensions from a cube, using index values specified in the array. Joshua Reich
This commit is contained in:
@@ -9,6 +9,14 @@ RETURNS cube
|
||||
AS 'MODULE_PATHNAME'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube(float8[], float8[]) RETURNS cube
|
||||
AS 'MODULE_PATHNAME', 'cube_a_f8_f8'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube(float8[]) RETURNS cube
|
||||
AS 'MODULE_PATHNAME', 'cube_a_f8'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube_out(cube)
|
||||
RETURNS cstring
|
||||
AS 'MODULE_PATHNAME'
|
||||
@@ -129,6 +137,11 @@ LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
-- Misc N-dimensional functions
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube_subset(cube, int4[])
|
||||
RETURNS cube
|
||||
AS 'MODULE_PATHNAME'
|
||||
LANGUAGE C IMMUTABLE STRICT;
|
||||
|
||||
-- proximity routines
|
||||
|
||||
CREATE OR REPLACE FUNCTION cube_distance(cube, cube)
|
||||
|
Reference in New Issue
Block a user