2007-03-08 05:21:12 +08:00
|
|
|
/* $PostgreSQL: pgsql/contrib/cube/cubedata.h,v 1.9 2007/03/07 21:21:12 teodor Exp $ */
|
2006-03-11 12:38:42 +08:00
|
|
|
|
2002-09-12 08:26:00 +08:00
|
|
|
#define CUBE_MAX_DIM (100)
|
2007-02-28 07:48:10 +08:00
|
|
|
|
2001-03-22 12:01:46 +08:00
|
|
|
typedef struct NDBOX
|
|
|
|
{
|
2007-02-28 07:48:10 +08:00
|
|
|
int32 vl_len_; /* varlena header (do not touch directly!) */
|
2001-03-22 12:01:46 +08:00
|
|
|
unsigned int dim;
|
2002-08-30 07:03:58 +08:00
|
|
|
double x[1];
|
2001-11-06 01:46:40 +08:00
|
|
|
} NDBOX;
|
2007-03-08 05:21:12 +08: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)
|