mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
2b1abc8756
fix it. Add macroses DatumGetNDBOX, PG_GETARG_NDBOX and PG_RETURN_NDBOX. Backpatch for 8.2 too. Previous versions use version 0 calling conventions. And fmgr code detoast values for user-defined functions.
14 lines
437 B
C
14 lines
437 B
C
/* $PostgreSQL: pgsql/contrib/cube/cubedata.h,v 1.7.2.1 2007/03/07 21:25:18 teodor Exp $ */
|
|
|
|
#define CUBE_MAX_DIM (100)
|
|
typedef struct NDBOX
|
|
{
|
|
unsigned int size; /* required to be a Postgres varlena type */
|
|
unsigned int dim;
|
|
double x[1];
|
|
} NDBOX;
|
|
|
|
#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)
|