2010-09-20 16:08:53 -04:00
|
|
|
/* contrib/cube/cubedata.h */
|
2006-03-10 23:38:42 -05:00
|
|
|
|
2002-09-11 20:26:00 -04:00
|
|
|
#define CUBE_MAX_DIM (100)
|
2007-02-27 18:48:10 -05:00
|
|
|
|
2001-03-21 23:01:46 -05:00
|
|
|
typedef struct NDBOX
|
|
|
|
|
{
|
2007-02-27 18:48:10 -05:00
|
|
|
int32 vl_len_; /* varlena header (do not touch directly!) */
|
2001-03-21 23:01:46 -05:00
|
|
|
unsigned int dim;
|
2002-08-29 19:03:58 -04:00
|
|
|
double x[1];
|
2009-06-11 10:49:15 -04:00
|
|
|
} NDBOX;
|
2007-03-07 16:21:12 -05:00
|
|
|
|
|
|
|
|
#define DatumGetNDBOX(x) ((NDBOX*)DatumGetPointer(x))
|
|
|
|
|
#define PG_GETARG_NDBOX(x) DatumGetNDBOX( PG_DETOAST_DATUM(PG_GETARG_DATUM(x)) )
|
|
|
|
|
#define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x)
|