29#define TOAST_INDEX_HACK
81#ifdef TOAST_INDEX_HACK
89 errmsg(
"number of index columns (%d) exceeds limit (%d)",
92#ifdef TOAST_INDEX_HACK
101 if (isnull[
i] ||
att->attlen != -1)
128 att->attcompression);
155#ifdef TOAST_INDEX_HACK
180#ifdef TOAST_INDEX_HACK
198#ifdef TOAST_INDEX_HACK
209 errmsg(
"index row requires %zu bytes, maximum size is %zu",
290 for (
i = 0;
i < byte;
i++)
313 if (
att->attcacheoff >= 0)
359 for (;
j < natts;
j++)
363 if (
att->attlen <= 0)
368 att->attcacheoff = off;
405 off =
att->attcacheoff;
406 else if (
att->attlen == -1)
416 att->attcacheoff = off;
430 att->attcacheoff = off;
505 if (!slow &&
thisatt->attcacheoff >= 0)
507 else if (
thisatt->attlen == -1)
static Datum values[MAXATTR]
#define Assert(condition)
struct varlena * detoast_external_attr(struct varlena *attr)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#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 index_deform_tuple(IndexTuple tup, TupleDesc tupleDescriptor, Datum *values, bool *isnull)
IndexTuple index_truncate_tuple(TupleDesc sourceDescriptor, IndexTuple source, int leavenatts)
IndexTuple CopyIndexTuple(IndexTuple source)
void index_deform_tuple_internal(TupleDesc tupleDescriptor, Datum *values, bool *isnull, char *tp, bits8 *bp, int hasnulls)
IndexTuple index_form_tuple_context(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull, MemoryContext context)
Datum nocache_index_getattr(IndexTuple tup, int attnum, TupleDesc tupleDesc)
IndexTuple index_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
static bool IndexTupleHasVarwidths(const IndexTupleData *itup)
IndexTupleData * IndexTuple
static bool IndexTupleHasNulls(const IndexTupleData *itup)
static Size IndexTupleSize(const IndexTupleData *itup)
static Size IndexInfoFindDataOffset(unsigned short t_info)
void * MemoryContextAllocZero(MemoryContext context, Size size)
void pfree(void *pointer)
MemoryContext CurrentMemoryContext
FormData_pg_attribute * Form_pg_attribute
static rewind_source * source
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
Datum toast_compress_datum(Datum value, char cmethod)
TupleDesc CreateTupleDescTruncatedCopy(TupleDesc tupdesc, int natts)
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)
static bool VARATT_IS_EXTENDED(const void *PTR)
static bool VARATT_IS_EXTERNAL(const void *PTR)
static Size VARSIZE(const void *PTR)