20#include "catalog/pg_type_d.h"
55 ttc->ttc_attr[
i].tai_colflags = 0;
56 ttc->ttc_attr[
i].tai_oldexternal =
NULL;
57 ttc->ttc_attr[
i].tai_compression =
att->attcompression;
73 if (
att->attlen == -1 && !
ttc->ttc_oldisnull[
i] &&
76 if (
ttc->ttc_isnull[
i] ||
111 if (
ttc->ttc_isnull[
i])
121 if (
att->attlen == -1)
static Datum values[MAXATTR]
struct varlena * detoast_attr(struct varlena *attr)
struct varlena * detoast_external_attr(struct varlena *attr)
#define TOAST_POINTER_SIZE
void pfree(void *pointer)
FormData_pg_attribute * Form_pg_attribute
static Datum PointerGetDatum(const void *X)
static Pointer DatumGetPointer(Datum X)
struct varlena * tai_oldexternal
void toast_tuple_init(ToastTupleContext *ttc)
void toast_delete_external(Relation rel, const Datum *values, const bool *isnull, bool is_speculative)
void toast_tuple_try_compression(ToastTupleContext *ttc, int attribute)
void toast_tuple_externalize(ToastTupleContext *ttc, int attribute, int options)
void toast_tuple_cleanup(ToastTupleContext *ttc)
int toast_tuple_find_biggest_attribute(ToastTupleContext *ttc, bool for_compression, bool check_main)
#define TOAST_NEEDS_CHANGE
#define TOASTCOL_NEEDS_DELETE_OLD
#define TOASTCOL_INCOMPRESSIBLE
#define TOAST_NEEDS_DELETE_OLD
#define TOASTCOL_NEEDS_FREE
void toast_delete_datum(Relation rel, Datum value, bool is_speculative)
Datum toast_save_datum(Relation rel, Datum value, struct varlena *oldexternal, int options)
Datum toast_compress_datum(Datum value, char cmethod)
static FormData_pg_attribute * TupleDescAttr(TupleDesc tupdesc, int i)
static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)
static bool VARATT_IS_EXTERNAL_ONDISK(const void *PTR)
static Size VARSIZE_ANY(const void *PTR)
static bool VARATT_IS_EXTERNAL(const void *PTR)
static Size VARSIZE(const void *PTR)
static bool VARATT_IS_COMPRESSED(const void *PTR)
static Size VARSIZE_EXTERNAL(const void *PTR)