49#define TOAST_INDEX_HACK
53 char *tp,
bits8 *nullbits,
bool nulls,
104 bool anynulls =
false;
108 uint16 phony_infomask = 0;
109 bits8 *phony_nullbitmap;
115#ifdef TOAST_INDEX_HACK
116 Datum *untoasted_values;
124 phony_nullbitmap = (
bits8 *)
127#ifdef TOAST_INDEX_HACK
149 nulls[idxattno++] =
true;
182#ifdef TOAST_INDEX_HACK
188 bool free_value =
false;
191 if (atttype->
typlen != -1)
221 (atttype->
typstorage == TYPSTORAGE_EXTENDED ||
235 if (att->atttypid == atttype->
type_id)
236 compression = att->attcompression;
258 untoasted_values[nuntoasted++] =
value;
267 Assert(idxattno <= brdesc->bd_totalstored);
305 (
char *) rettuple + hoff,
313 pfree(phony_nullbitmap);
315#ifdef TOAST_INDEX_HACK
316 for (
i = 0;
i < nuntoasted;
i++)
448 if (!destsz || *destsz == 0)
450 else if (
len > *destsz)
469 if (memcmp(
a,
b, alen) != 0)
518 currdatum = (
char *) dtuple +
589 values, allnulls, hasnulls);
596 for (valueno = 0, keyno = 0; keyno < brdesc->
bd_tupdesc->
natts; keyno++)
646 char *tp,
bits8 *nullbits,
bool nulls,
704 if (thisatt->
attlen == -1)
static Datum values[MAXATTR]
BrinTuple * brin_copy_tuple(BrinTuple *tuple, Size len, BrinTuple *dest, Size *destsz)
static void brin_deconstruct_tuple(BrinDesc *brdesc, char *tp, bits8 *nullbits, bool nulls, Datum *values, bool *allnulls, bool *hasnulls)
bool brin_tuples_equal(const BrinTuple *a, Size alen, const BrinTuple *b, Size blen)
BrinTuple * brin_form_tuple(BrinDesc *brdesc, BlockNumber blkno, BrinMemTuple *tuple, Size *size)
BrinMemTuple * brin_new_memtuple(BrinDesc *brdesc)
void brin_free_tuple(BrinTuple *tuple)
BrinTuple * brin_form_placeholder_tuple(BrinDesc *brdesc, BlockNumber blkno, Size *size)
BrinMemTuple * brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc)
BrinMemTuple * brin_deform_tuple(BrinDesc *brdesc, BrinTuple *tuple, BrinMemTuple *dMemtuple)
static TupleDesc brtuple_disk_tupdesc(BrinDesc *brdesc)
#define BRIN_EMPTY_RANGE_MASK
#define BrinTupleIsEmptyRange(tup)
#define BrinTupleDataOffset(tup)
#define BrinTupleIsPlaceholder(tup)
#define BRIN_PLACEHOLDER_MASK
#define BrinTupleHasNulls(tup)
struct BrinValues BrinValues
#define Assert(condition)
Datum datumCopy(Datum value, bool typByVal, int typLen)
struct varlena * detoast_external_attr(struct varlena *attr)
#define TOAST_INDEX_TARGET
Size heap_compute_data_size(TupleDesc tupleDesc, const Datum *values, const bool *isnull)
void heap_fill_tuple(TupleDesc tupleDesc, const Datum *values, const bool *isnull, char *data, Size data_size, uint16 *infomask, bits8 *bit)
void MemoryContextReset(MemoryContext context)
void * repalloc(void *pointer, Size size)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
#define AllocSetContextCreate
#define ALLOCSET_DEFAULT_SIZES
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
FormData_pg_attribute * Form_pg_attribute
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
static pg_noinline void Size size
BrinOpcInfo * bd_info[FLEXIBLE_ARRAY_MEMBER]
BrinValues bt_columns[FLEXIBLE_ARRAY_MEMBER]
TypeCacheEntry * oi_typcache[FLEXIBLE_ARRAY_MEMBER]
brin_serialize_callback_type bv_serialize
#define InvalidCompressionMethod
Datum toast_compress_datum(Datum value, char cmethod)
TupleDesc CreateTemplateTupleDesc(int natts)
void TupleDescInitEntry(TupleDesc desc, AttrNumber attributeNumber, const char *attributeName, Oid oidtypeid, int32 typmod, int attdim)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
#define att_nominal_alignby(cur_offset, attalignby)
static bool att_isnull(int ATT, const bits8 *BITS)
#define att_addlength_pointer(cur_offset, attlen, attptr)
#define att_pointer_alignby(cur_offset, attalignby, attlen, attptr)
#define VARATT_IS_EXTENDED(PTR)
#define VARATT_IS_EXTERNAL(PTR)