cubedata.h File Reference
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
#define
SET_DIM(cube, _dim) ( (cube)->header = ((cube)->header & ~
DIM_MASK) | (_dim) )
Macro Definition Documentation
◆ CUBE_MAX_DIM
#define CUBE_MAX_DIM (100)
◆ CUBE_SIZE
#define CUBE_SIZE
(
_dim )
(offsetof(
NDBOX,
x) + sizeof(double)*(_dim)*2)
◆ CubeKNNDistanceChebyshev
#define CubeKNNDistanceChebyshev 18 /* <=> */
◆ CubeKNNDistanceCoord
#define CubeKNNDistanceCoord 15 /* ~> */
◆ CubeKNNDistanceEuclid
#define CubeKNNDistanceEuclid 17 /* <-> */
◆ CubeKNNDistanceTaxicab
#define CubeKNNDistanceTaxicab 16 /* <#> */
◆ DatumGetNDBOXP
◆ DIM
#define DIM
(
cube )
( (cube)->header &
DIM_MASK )
◆ DIM_MASK
#define DIM_MASK 0x7fffffff
◆ IS_POINT
#define IS_POINT
(
cube )
( ((cube)->header &
POINT_BIT) != 0 )
◆ LL_COORD
◆ PG_GETARG_NDBOX_P
◆ PG_RETURN_NDBOX_P
◆ POINT_BIT
#define POINT_BIT 0x80000000
◆ POINT_SIZE
#define POINT_SIZE
(
_dim )
(offsetof(
NDBOX,
x) + sizeof(double)*(_dim))
◆ SET_DIM
#define SET_DIM
(
cube,
_dim
)
( (cube)->header = ((cube)->header & ~
DIM_MASK) | (_dim) )
◆ SET_POINT_BIT
#define SET_POINT_BIT
(
cube )
( (cube)->header |=
POINT_BIT )
◆ UR_COORD
◆ YYSTYPE
Typedef Documentation
◆ NDBOX
◆ yyscan_t
Function Documentation
◆ cube_scanner_finish()
void cube_scanner_finish
(
yyscan_t
yyscanner )
◆ cube_scanner_init()
void cube_scanner_init
(
const char *
str,
)
Definition at line 102 of file cubescan.l.
103{
106
107 if (yylex_init(yyscannerp) != 0)
109
110 yyscanner = *yyscannerp;
111
112 yy_scan_bytes(
str, slen, yyscanner);
113 *scanbuflen = slen;
114}
References elog, ERROR, and str.
Referenced by cube_in().
◆ cube_yyerror()
void cube_yyerror
(
NDBOX **
result,
const char *
message
)
Definition at line 71 of file cubescan.l.
75{
77 * macro */
78
79 if (*yytext == YY_END_OF_BUFFER_CHAR)
80 {
82 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
83 errmsg(
"invalid input syntax for cube"),
84 /* translator: %s is typically "syntax error" */
85 errdetail(
"%s at end of input", message)));
86 }
87 else
88 {
90 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
91 errmsg(
"invalid input syntax for cube"),
92 /* translator: first %s is typically "syntax error" */
93 errdetail(
"%s at or near \"%s\"", message, yytext)));
94 }
95}
int errdetail(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define errsave(context,...)
References errcode(), errdetail(), errmsg(), and errsave.
◆ cube_yylex()
int cube_yylex
(
YYSTYPE *
yylval_param,
)
◆ cube_yyparse()
int cube_yyparse
(
NDBOX **
result,
)