mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Cube extension kNN support
Introduce distance operators over cubes: <#> taxicab distance <-> euclidean distance <=> chebyshev distance Also add kNN support of those distances in GiST opclass. Author: Stas Kelvich
This commit is contained in:
@ -47,6 +47,11 @@ typedef struct NDBOX
|
||||
#define PG_GETARG_NDBOX(x) DatumGetNDBOX(PG_GETARG_DATUM(x))
|
||||
#define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x)
|
||||
|
||||
#define CubeKNNDistanceCoord 15 /* ~> */
|
||||
#define CubeKNNDistanceTaxicab 16 /* <#> */
|
||||
#define CubeKNNDistanceEuclid 17 /* <-> */
|
||||
#define CubeKNNDistanceChebyshev 18 /* <=> */
|
||||
|
||||
/* in cubescan.l */
|
||||
extern int cube_yylex(void);
|
||||
extern void cube_yyerror(NDBOX **result, const char *message) pg_attribute_noreturn();
|
||||
|
Reference in New Issue
Block a user