1 /* contrib/cube/cube--1.0--1.1.sql */
3 -- complain if script is sourced in psql, rather than via ALTER EXTENSION
4 \echo Use "ALTER EXTENSION cube UPDATE TO '1.1'" to load this file. \quit
6 CREATE FUNCTION distance_chebyshev(cube, cube)
9 LANGUAGE C IMMUTABLE STRICT;
11 CREATE FUNCTION distance_taxicab(cube, cube)
14 LANGUAGE C IMMUTABLE STRICT;
16 CREATE FUNCTION cube_coord(cube, int4)
19 LANGUAGE C IMMUTABLE STRICT;
21 CREATE FUNCTION cube_coord_llur(cube, int4)
24 LANGUAGE C IMMUTABLE STRICT;
27 LEFTARG = cube, RIGHTARG = int, PROCEDURE = cube_coord
31 LEFTARG = cube, RIGHTARG = int, PROCEDURE = cube_coord_llur
35 LEFTARG = cube, RIGHTARG = cube, PROCEDURE = distance_taxicab,
40 LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_distance,
45 LEFTARG = cube, RIGHTARG = cube, PROCEDURE = distance_chebyshev,
49 CREATE FUNCTION g_cube_distance (internal, cube, smallint, oid)
52 LANGUAGE C IMMUTABLE STRICT;
54 ALTER OPERATOR FAMILY gist_cube_ops USING gist ADD
55 OPERATOR 15 ~> (cube, int) FOR ORDER BY float_ops,
56 OPERATOR 16 <#> (cube, cube) FOR ORDER BY float_ops,
57 OPERATOR 17 <-> (cube, cube) FOR ORDER BY float_ops,
58 OPERATOR 18 <=> (cube, cube) FOR ORDER BY float_ops,
59 FUNCTION 8 (cube, cube) g_cube_distance (internal, cube, smallint, oid);