PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
varbit.h File Reference
#include <limits.h>
#include "fmgr.h"
Include dependency graph for varbit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  VarBit
 

Macros

#define DatumGetVarBitP(X)   ((VarBit *) PG_DETOAST_DATUM(X))
 
#define DatumGetVarBitPCopy(X)   ((VarBit *) PG_DETOAST_DATUM_COPY(X))
 
#define VarBitPGetDatum(X)   PointerGetDatum(X)
 
#define PG_GETARG_VARBIT_P(n)   DatumGetVarBitP(PG_GETARG_DATUM(n))
 
#define PG_GETARG_VARBIT_P_COPY(n)   DatumGetVarBitPCopy(PG_GETARG_DATUM(n))
 
#define PG_RETURN_VARBIT_P(x)   return VarBitPGetDatum(x)
 
#define VARBITHDRSZ   sizeof(int32)
 
#define VARBITLEN(PTR)   (((VarBit *) (PTR))->bit_len)
 
#define VARBITS(PTR)   (((VarBit *) (PTR))->bit_dat)
 
#define VARBITBYTES(PTR)   (VARSIZE(PTR) - VARHDRSZ - VARBITHDRSZ)
 
#define VARBITPAD(PTR)   (VARBITBYTES(PTR)*BITS_PER_BYTE - VARBITLEN(PTR))
 
#define VARBITTOTALLEN(BITLEN)
 
#define VARBITMAXLEN   (INT_MAX - BITS_PER_BYTE + 1)
 
#define VARBITEND(PTR)   (((bits8 *) (PTR)) + VARSIZE(PTR))
 
#define BITMASK   0xFF
 

Macro Definition Documentation

#define DatumGetVarBitP (   X)    ((VarBit *) PG_DETOAST_DATUM(X))

Definition at line 39 of file varbit.h.

#define DatumGetVarBitPCopy (   X)    ((VarBit *) PG_DETOAST_DATUM_COPY(X))

Definition at line 40 of file varbit.h.

#define PG_GETARG_VARBIT_P_COPY (   n)    DatumGetVarBitPCopy(PG_GETARG_DATUM(n))

Definition at line 43 of file varbit.h.

#define VARBITEND (   PTR)    (((bits8 *) (PTR)) + VARSIZE(PTR))
#define VARBITHDRSZ   sizeof(int32)

Definition at line 47 of file varbit.h.

Referenced by bitsubstring().

#define VARBITMAXLEN   (INT_MAX - BITS_PER_BYTE + 1)
#define VARBITPAD (   PTR)    (VARBITBYTES(PTR)*BITS_PER_BYTE - VARBITLEN(PTR))
#define VarBitPGetDatum (   X)    PointerGetDatum(X)

Definition at line 41 of file varbit.h.

Referenced by bitshiftleft(), and bitshiftright().

#define VARBITTOTALLEN (   BITLEN)
Value:
(((BITLEN) + BITS_PER_BYTE-1)/BITS_PER_BYTE + \
#define BITS_PER_BYTE
#define VARHDRSZ
Definition: c.h:441
#define VARBITHDRSZ
Definition: varbit.h:47

Definition at line 57 of file varbit.h.

Referenced by bit(), bit_catenate(), bit_in(), bit_recv(), bitfromint4(), bitfromint8(), bitsubstring(), varbit(), varbit_in(), and varbit_recv().