|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/detoast.h"#include "access/genam.h"#include "access/heapam.h"#include "access/heaptoast.h"#include "access/toast_helper.h"#include "access/toast_internals.h"#include "utils/fmgroids.h"
Go to the source code of this file.
| void heap_fetch_toast_slice | ( | Relation | toastrel, |
| Oid | valueid, | ||
| int32 | attrsize, | ||
| int32 | sliceoffset, | ||
| int32 | slicelength, | ||
| struct varlena * | result | ||
| ) |
Definition at line 626 of file heaptoast.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, BTGreaterEqualStrategyNumber, BTLessEqualStrategyNumber, DatumGetInt32(), DatumGetPointer(), elog, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg_internal(), ERROR, fastgetattr(), fb(), ForwardScanDirection, get_toast_snapshot(), Int32GetDatum(), ObjectIdGetDatum(), RelationGetRelationName, ScanKeyInit(), systable_beginscan_ordered(), systable_endscan_ordered(), systable_getnext_ordered(), toast_close_indexes(), TOAST_MAX_CHUNK_SIZE, toast_open_indexes(), VARATT_IS_EXTENDED(), VARATT_IS_SHORT(), VARDATA(), VARDATA_SHORT(), VARHDRSZ, VARHDRSZ_SHORT, VARSIZE(), and VARSIZE_SHORT().
Definition at line 43 of file heaptoast.c.
References Assert, fb(), heap_deform_tuple(), MaxHeapAttributeNumber, RelationData::rd_att, RelationData::rd_rel, and toast_delete_external().
Referenced by heap_abort_speculative(), and heap_delete().
| HeapTuple heap_toast_insert_or_update | ( | Relation | rel, |
| HeapTuple | newtup, | ||
| HeapTuple | oldtup, | ||
| int | options | ||
| ) |
Definition at line 96 of file heaptoast.c.
References Assert, attstorage, BITMAPLEN(), fb(), heap_compute_data_size(), heap_deform_tuple(), heap_fill_tuple(), HeapTupleHeaderSetNatts, HEAPTUPLESIZE, InvalidOid, MAXALIGN, MaxHeapAttributeNumber, TupleDescData::natts, palloc0(), RelationData::rd_att, RelationData::rd_rel, RelationGetToastTupleTarget, SizeofHeapTupleHeader, TOAST_HAS_NULLS, TOAST_NEEDS_CHANGE, toast_tuple_cleanup(), toast_tuple_externalize(), toast_tuple_find_biggest_attribute(), toast_tuple_init(), TOAST_TUPLE_TARGET, TOAST_TUPLE_TARGET_MAIN, toast_tuple_try_compression(), TOASTCOL_INCOMPRESSIBLE, and TupleDescAttr().
Referenced by heap_prepare_insert(), heap_update(), and raw_heap_insert().
| HeapTuple toast_build_flattened_tuple | ( | TupleDesc | tupleDesc, |
| const Datum * | values, | ||
| const bool * | isnull | ||
| ) |
Definition at line 563 of file heaptoast.c.
References Assert, attlen, DatumGetPointer(), detoast_external_attr(), fb(), heap_form_tuple(), i, MaxTupleAttributeNumber, pfree(), PointerGetDatum(), TupleDescCompactAttr(), values, and VARATT_IS_EXTERNAL().
Referenced by ExecEvalWholeRowVar().
Definition at line 350 of file heaptoast.c.
References Assert, attlen, DatumGetPointer(), detoast_external_attr(), fb(), HEAP2_XACT_MASK, heap_deform_tuple(), heap_form_tuple(), HEAP_XACT_MASK, i, MaxTupleAttributeNumber, pfree(), PointerGetDatum(), TupleDescCompactAttr(), and VARATT_IS_EXTERNAL().
Referenced by CatalogCacheCreateEntry(), expanded_record_set_tuple(), and ExtractReplicaIdentity().
| Datum toast_flatten_tuple_to_datum | ( | HeapTupleHeader | tup, |
| uint32 | tup_len, | ||
| TupleDesc | tupleDesc | ||
| ) |
Definition at line 449 of file heaptoast.c.
References Assert, attlen, BITMAPLEN(), DatumGetPointer(), detoast_attr(), fb(), heap_compute_data_size(), heap_deform_tuple(), heap_fill_tuple(), HeapTupleHeaderSetDatumLength(), HeapTupleHeaderSetNatts, HeapTupleHeaderSetTypeId(), HeapTupleHeaderSetTypMod(), i, InvalidOid, ItemPointerSetInvalid(), MAXALIGN, MaxTupleAttributeNumber, palloc0(), pfree(), PointerGetDatum(), SizeofHeapTupleHeader, HeapTupleData::t_len, TupleDescCompactAttr(), VARATT_IS_COMPRESSED(), and VARATT_IS_EXTERNAL().
Referenced by heap_copy_tuple_as_datum(), and HeapTupleHeaderGetDatum().