PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/brin_tuple.h"
#include "access/detoast.h"
#include "access/heaptoast.h"
#include "access/htup_details.h"
#include "access/toast_internals.h"
#include "access/tupdesc.h"
#include "access/tupmacs.h"
#include "utils/datum.h"
#include "utils/memutils.h"
Go to the source code of this file.
Macros | |
#define | TOAST_INDEX_HACK |
Functions | |
static void | brin_deconstruct_tuple (BrinDesc *brdesc, char *tp, bits8 *nullbits, bool nulls, Datum *values, bool *allnulls, bool *hasnulls) |
static TupleDesc | brtuple_disk_tupdesc (BrinDesc *brdesc) |
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 TOAST_INDEX_HACK |
Definition at line 49 of file brin_tuple.c.
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().
|
inlinestatic |
Definition at line 645 of file brin_tuple.c.
References att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull(), attnum, BrinDesc::bd_info, BrinDesc::bd_tupdesc, brtuple_disk_tupdesc(), fetchatt, TupleDescData::natts, BrinOpcInfo::oi_nstored, TupleDescAttr, and values.
Referenced by brin_deform_tuple().
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().
Definition at line 61 of file brin_tuple.c.
References BrinDesc::bd_context, BrinDesc::bd_disktdesc, BrinDesc::bd_info, BrinDesc::bd_totalstored, BrinDesc::bd_tupdesc, CreateTemplateTupleDesc(), i, j, MemoryContextSwitchTo(), TupleDescData::natts, BrinOpcInfo::oi_nstored, BrinOpcInfo::oi_typcache, TupleDescInitEntry(), and TypeCacheEntry::type_id.
Referenced by brin_deconstruct_tuple(), and brin_form_tuple().