PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | BrinValues |
struct | BrinMemTuple |
struct | BrinTuple |
Macros | |
#define | SizeOfBrinTuple (offsetof(BrinTuple, bt_info) + sizeof(uint8)) |
#define | BRIN_OFFSET_MASK 0x1F |
#define | BRIN_EMPTY_RANGE_MASK 0x20 |
#define | BRIN_PLACEHOLDER_MASK 0x40 |
#define | BRIN_NULLS_MASK 0x80 |
#define | BrinTupleDataOffset(tup) ((Size) (((BrinTuple *) (tup))->bt_info & BRIN_OFFSET_MASK)) |
#define | BrinTupleHasNulls(tup) (((((BrinTuple *) (tup))->bt_info & BRIN_NULLS_MASK)) != 0) |
#define | BrinTupleIsPlaceholder(tup) (((((BrinTuple *) (tup))->bt_info & BRIN_PLACEHOLDER_MASK)) != 0) |
#define | BrinTupleIsEmptyRange(tup) (((((BrinTuple *) (tup))->bt_info & BRIN_EMPTY_RANGE_MASK)) != 0) |
Typedefs | |
typedef void(* | brin_serialize_callback_type) (BrinDesc *bdesc, Datum src, Datum *dst) |
typedef struct BrinValues | BrinValues |
typedef struct BrinMemTuple | BrinMemTuple |
typedef struct BrinTuple | BrinTuple |
Functions | |
BrinTuple * | brin_form_tuple (BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, Size *size) |
BrinTuple * | brin_form_placeholder_tuple (BrinDesc *brdesc, BlockNumber blkno, Size *size) |
void | brin_free_tuple (BrinTuple *tuple) |
BrinTuple * | brin_copy_tuple (BrinTuple *tuple, Size len, BrinTuple *dest, Size *destsz) |
bool | brin_tuples_equal (const BrinTuple *a, Size alen, const BrinTuple *b, Size blen) |
BrinMemTuple * | brin_new_memtuple (BrinDesc *brdesc) |
BrinMemTuple * | brin_memtuple_initialize (BrinMemTuple *dtuple, BrinDesc *brdesc) |
BrinMemTuple * | brin_deform_tuple (BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple) |
#define BRIN_EMPTY_RANGE_MASK 0x20 |
Definition at line 86 of file brin_tuple.h.
#define BRIN_NULLS_MASK 0x80 |
Definition at line 88 of file brin_tuple.h.
#define BRIN_OFFSET_MASK 0x1F |
Definition at line 85 of file brin_tuple.h.
#define BRIN_PLACEHOLDER_MASK 0x40 |
Definition at line 87 of file brin_tuple.h.
#define BrinTupleDataOffset | ( | tup | ) | ((Size) (((BrinTuple *) (tup))->bt_info & BRIN_OFFSET_MASK)) |
Definition at line 90 of file brin_tuple.h.
#define BrinTupleHasNulls | ( | tup | ) | (((((BrinTuple *) (tup))->bt_info & BRIN_NULLS_MASK)) != 0) |
Definition at line 91 of file brin_tuple.h.
#define BrinTupleIsEmptyRange | ( | tup | ) | (((((BrinTuple *) (tup))->bt_info & BRIN_EMPTY_RANGE_MASK)) != 0) |
Definition at line 93 of file brin_tuple.h.
#define BrinTupleIsPlaceholder | ( | tup | ) | (((((BrinTuple *) (tup))->bt_info & BRIN_PLACEHOLDER_MASK)) != 0) |
Definition at line 92 of file brin_tuple.h.
Definition at line 80 of file brin_tuple.h.
Definition at line 21 of file brin_tuple.h.
typedef struct BrinMemTuple BrinMemTuple |
typedef struct BrinValues BrinValues |
Definition at line 446 of file brin_tuple.c.
References generate_unaccent_rules::dest, len, palloc(), and repalloc().
Referenced by brin_evacuate_page(), bringetbitmap(), brininsert(), and summarize_range().
BrinMemTuple* brin_deform_tuple | ( | BrinDesc * | brdesc, |
BrinTuple * | tuple, | ||
BrinMemTuple * | dMemtuple | ||
) |
Definition at line 553 of file brin_tuple.c.
References BrinDesc::bd_info, BrinDesc::bd_tupdesc, brin_deconstruct_tuple(), brin_memtuple_initialize(), brin_new_memtuple(), BrinTupleDataOffset, BrinTupleHasNulls, BrinTupleIsEmptyRange, BrinTupleIsPlaceholder, BrinMemTuple::bt_allnulls, BrinMemTuple::bt_blkno, BrinTuple::bt_blkno, BrinMemTuple::bt_columns, BrinMemTuple::bt_context, BrinMemTuple::bt_empty_range, BrinMemTuple::bt_hasnulls, BrinMemTuple::bt_placeholder, BrinMemTuple::bt_values, BrinValues::bv_allnulls, BrinValues::bv_context, BrinValues::bv_hasnulls, BrinValues::bv_mem_value, BrinValues::bv_serialize, BrinValues::bv_values, datumCopy(), i, MemoryContextSwitchTo(), TupleDescData::natts, BrinOpcInfo::oi_nstored, BrinOpcInfo::oi_typcache, PointerGetDatum(), SizeOfBrinTuple, TypeCacheEntry::typbyval, TypeCacheEntry::typlen, and values.
Referenced by _brin_parallel_merge(), brin_page_items(), bringetbitmap(), brininsert(), and union_tuples().
BrinTuple* brin_form_placeholder_tuple | ( | BrinDesc * | brdesc, |
BlockNumber | blkno, | ||
Size * | size | ||
) |
Definition at line 388 of file brin_tuple.c.
References BrinDesc::bd_tupdesc, BITMAPLEN, BRIN_EMPTY_RANGE_MASK, BRIN_NULLS_MASK, BRIN_PLACEHOLDER_MASK, BrinTuple::bt_blkno, BrinTuple::bt_info, HIGHBIT, len, MAXALIGN, TupleDescData::natts, palloc0(), size, and SizeOfBrinTuple.
Referenced by summarize_range().
BrinTuple* brin_form_tuple | ( | BrinDesc * | brdesc, |
BlockNumber | blkno, | ||
BrinMemTuple * | tuple, | ||
Size * | size | ||
) |
Definition at line 99 of file brin_tuple.c.
References Assert, BrinDesc::bd_info, BrinDesc::bd_totalstored, BrinDesc::bd_tupdesc, BITMAPLEN, BRIN_EMPTY_RANGE_MASK, BRIN_NULLS_MASK, BRIN_OFFSET_MASK, BRIN_PLACEHOLDER_MASK, brtuple_disk_tupdesc(), BrinTuple::bt_blkno, BrinMemTuple::bt_columns, BrinMemTuple::bt_empty_range, BrinTuple::bt_info, BrinMemTuple::bt_placeholder, BrinValues::bv_allnulls, BrinValues::bv_hasnulls, BrinValues::bv_mem_value, BrinValues::bv_serialize, BrinValues::bv_values, DatumGetPointer(), detoast_external_attr(), heap_compute_data_size(), heap_fill_tuple(), HIGHBIT, i, InvalidCompressionMethod, len, MAXALIGN, TupleDescData::natts, BrinOpcInfo::oi_nstored, BrinOpcInfo::oi_typcache, palloc(), palloc0(), pfree(), PointerGetDatum(), size, SizeOfBrinTuple, toast_compress_datum(), TOAST_INDEX_TARGET, TupleDescAttr, TypeCacheEntry::type_id, TypeCacheEntry::typlen, TypeCacheEntry::typstorage, value, values, VARATT_IS_EXTENDED, VARATT_IS_EXTERNAL, and VARSIZE.
Referenced by _brin_parallel_merge(), brin_build_empty_tuple(), brininsert(), form_and_insert_tuple(), form_and_spill_tuple(), and summarize_range().
void brin_free_tuple | ( | BrinTuple * | tuple | ) |
BrinMemTuple* brin_memtuple_initialize | ( | BrinMemTuple * | dtuple, |
BrinDesc * | brdesc | ||
) |
Definition at line 511 of file brin_tuple.c.
References BrinDesc::bd_info, BrinDesc::bd_tupdesc, BrinMemTuple::bt_columns, BrinMemTuple::bt_context, BrinMemTuple::bt_empty_range, BrinValues::bv_allnulls, BrinValues::bv_attno, BrinValues::bv_context, BrinValues::bv_hasnulls, BrinValues::bv_mem_value, BrinValues::bv_serialize, BrinValues::bv_values, i, MAXALIGN, MemoryContextReset(), TupleDescData::natts, BrinOpcInfo::oi_nstored, and PointerGetDatum().
Referenced by brin_deform_tuple(), brin_new_memtuple(), brinbuildCallback(), brinbuildCallbackParallel(), and brinsummarize().
BrinMemTuple* brin_new_memtuple | ( | BrinDesc * | brdesc | ) |
Definition at line 482 of file brin_tuple.c.
References ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, BrinDesc::bd_totalstored, BrinDesc::bd_tupdesc, brin_memtuple_initialize(), BrinMemTuple::bt_allnulls, BrinMemTuple::bt_context, BrinMemTuple::bt_empty_range, BrinMemTuple::bt_hasnulls, BrinMemTuple::bt_values, CurrentMemoryContext, MAXALIGN, TupleDescData::natts, palloc(), and palloc0().
Referenced by _brin_parallel_merge(), brin_build_empty_tuple(), brin_deform_tuple(), bringetbitmap(), and initialize_brin_buildstate().