PostgreSQL Source Code  git master
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

◆ BITMASK

◆ DatumGetVarBitP

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

Definition at line 39 of file varbit.h.

◆ DatumGetVarBitPCopy

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

Definition at line 40 of file varbit.h.

◆ PG_GETARG_VARBIT_P

◆ PG_GETARG_VARBIT_P_COPY

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

Definition at line 43 of file varbit.h.

◆ PG_RETURN_VARBIT_P

◆ VARBITBYTES

◆ VARBITEND

#define VARBITEND (   PTR)    (((bits8 *) (PTR)) + VARSIZE(PTR))

◆ VARBITHDRSZ

#define VARBITHDRSZ   sizeof(int32)

Definition at line 47 of file varbit.h.

Referenced by bitsubstring().

◆ VARBITLEN

◆ VARBITMAXLEN

#define VARBITMAXLEN   (INT_MAX - BITS_PER_BYTE + 1)

◆ VARBITPAD

#define VARBITPAD (   PTR)    (VARBITBYTES(PTR)*BITS_PER_BYTE - VARBITLEN(PTR))

◆ VarBitPGetDatum

#define VarBitPGetDatum (   X)    PointerGetDatum(X)

Definition at line 41 of file varbit.h.

Referenced by bitshiftleft(), and bitshiftright().

◆ VARBITS

◆ VARBITTOTALLEN

#define VARBITTOTALLEN (   BITLEN)
Value:
(((BITLEN) + BITS_PER_BYTE-1)/BITS_PER_BYTE + \
VARHDRSZ + VARBITHDRSZ)
#define BITS_PER_BYTE
#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().