|
PostgreSQL Source Code git master
|
#include "utils/rel.h"

Go to the source code of this file.
Data Structures | |
| struct | ToastAttrInfo |
| struct | ToastTupleContext |
Macros | |
| #define | TOAST_NEEDS_DELETE_OLD 0x0001 |
| #define | TOAST_NEEDS_FREE 0x0002 |
| #define | TOAST_HAS_NULLS 0x0004 |
| #define | TOAST_NEEDS_CHANGE 0x0008 |
| #define | TOASTCOL_NEEDS_DELETE_OLD TOAST_NEEDS_DELETE_OLD |
| #define | TOASTCOL_NEEDS_FREE TOAST_NEEDS_FREE |
| #define | TOASTCOL_IGNORE 0x0010 |
| #define | TOASTCOL_INCOMPRESSIBLE 0x0020 |
Functions | |
| void | toast_tuple_init (ToastTupleContext *ttc) |
| int | toast_tuple_find_biggest_attribute (ToastTupleContext *ttc, bool for_compression, bool check_main) |
| 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) |
| void | toast_delete_external (Relation rel, const Datum *values, const bool *isnull, bool is_speculative) |
| #define TOAST_HAS_NULLS 0x0004 |
Definition at line 80 of file toast_helper.h.
| #define TOAST_NEEDS_CHANGE 0x0008 |
Definition at line 81 of file toast_helper.h.
| #define TOAST_NEEDS_DELETE_OLD 0x0001 |
Definition at line 78 of file toast_helper.h.
| #define TOAST_NEEDS_FREE 0x0002 |
Definition at line 79 of file toast_helper.h.
| #define TOASTCOL_IGNORE 0x0010 |
Definition at line 101 of file toast_helper.h.
| #define TOASTCOL_INCOMPRESSIBLE 0x0020 |
Definition at line 102 of file toast_helper.h.
| #define TOASTCOL_NEEDS_DELETE_OLD TOAST_NEEDS_DELETE_OLD |
Definition at line 99 of file toast_helper.h.
| #define TOASTCOL_NEEDS_FREE TOAST_NEEDS_FREE |
Definition at line 100 of file toast_helper.h.
| void toast_delete_external | ( | Relation | rel, |
| const Datum * | values, | ||
| const bool * | isnull, | ||
| bool | is_speculative | ||
| ) |
Definition at line 318 of file toast_helper.c.
References attlen, DatumGetPointer(), i, TupleDescData::natts, RelationData::rd_att, toast_delete_datum(), TupleDescCompactAttr(), value, values, and VARATT_IS_EXTERNAL_ONDISK().
Referenced by heap_toast_delete().
| void toast_tuple_cleanup | ( | ToastTupleContext * | ttc | ) |
Definition at line 275 of file toast_helper.c.
References DatumGetPointer(), i, TupleDescData::natts, pfree(), RelationData::rd_att, ToastAttrInfo::tai_colflags, toast_delete_datum(), TOAST_NEEDS_DELETE_OLD, TOAST_NEEDS_FREE, TOASTCOL_NEEDS_DELETE_OLD, TOASTCOL_NEEDS_FREE, ToastTupleContext::ttc_attr, ToastTupleContext::ttc_flags, ToastTupleContext::ttc_oldvalues, ToastTupleContext::ttc_rel, and ToastTupleContext::ttc_values.
Referenced by heap_toast_insert_or_update().
| void toast_tuple_externalize | ( | ToastTupleContext * | ttc, |
| int | attribute, | ||
| int | options | ||
| ) |
Definition at line 256 of file toast_helper.c.
References DatumGetPointer(), pfree(), ToastAttrInfo::tai_colflags, ToastAttrInfo::tai_oldexternal, TOAST_NEEDS_CHANGE, TOAST_NEEDS_FREE, toast_save_datum(), TOASTCOL_IGNORE, TOASTCOL_NEEDS_FREE, ToastTupleContext::ttc_attr, ToastTupleContext::ttc_flags, ToastTupleContext::ttc_rel, ToastTupleContext::ttc_values, and value.
Referenced by heap_toast_insert_or_update().
| int toast_tuple_find_biggest_attribute | ( | ToastTupleContext * | ttc, |
| bool | for_compression, | ||
| bool | check_main | ||
| ) |
Definition at line 181 of file toast_helper.c.
References DatumGetPointer(), i, MAXALIGN, TupleDescData::natts, RelationData::rd_att, ToastAttrInfo::tai_colflags, ToastAttrInfo::tai_size, TOAST_POINTER_SIZE, TOASTCOL_IGNORE, TOASTCOL_INCOMPRESSIBLE, ToastTupleContext::ttc_attr, ToastTupleContext::ttc_rel, ToastTupleContext::ttc_values, TupleDescAttr(), VARATT_IS_COMPRESSED(), and VARATT_IS_EXTERNAL().
Referenced by heap_toast_insert_or_update().
| void toast_tuple_init | ( | ToastTupleContext * | ttc | ) |
Definition at line 41 of file toast_helper.c.
References DatumGetPointer(), detoast_attr(), detoast_external_attr(), i, TupleDescData::natts, PointerGetDatum(), RelationData::rd_att, ToastAttrInfo::tai_colflags, ToastAttrInfo::tai_compression, ToastAttrInfo::tai_oldexternal, ToastAttrInfo::tai_size, TOAST_HAS_NULLS, TOAST_NEEDS_CHANGE, TOAST_NEEDS_DELETE_OLD, TOAST_NEEDS_FREE, TOASTCOL_IGNORE, TOASTCOL_NEEDS_DELETE_OLD, TOASTCOL_NEEDS_FREE, ToastTupleContext::ttc_attr, ToastTupleContext::ttc_flags, ToastTupleContext::ttc_isnull, ToastTupleContext::ttc_oldisnull, ToastTupleContext::ttc_oldvalues, ToastTupleContext::ttc_rel, ToastTupleContext::ttc_values, TupleDescAttr(), VARATT_IS_EXTERNAL(), VARATT_IS_EXTERNAL_ONDISK(), VARSIZE_ANY(), and VARSIZE_EXTERNAL().
Referenced by heap_toast_insert_or_update().
| void toast_tuple_try_compression | ( | ToastTupleContext * | ttc, |
| int | attribute | ||
| ) |
Definition at line 227 of file toast_helper.c.
References DatumGetPointer(), pfree(), ToastAttrInfo::tai_colflags, ToastAttrInfo::tai_compression, ToastAttrInfo::tai_size, toast_compress_datum(), TOAST_NEEDS_CHANGE, TOAST_NEEDS_FREE, TOASTCOL_INCOMPRESSIBLE, TOASTCOL_NEEDS_FREE, ToastTupleContext::ttc_attr, ToastTupleContext::ttc_flags, ToastTupleContext::ttc_values, value, and VARSIZE().
Referenced by heap_toast_insert_or_update().