PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/detoast.h"
#include "access/table.h"
#include "access/tableam.h"
#include "access/toast_internals.h"
#include "common/int.h"
#include "common/pg_lzcompress.h"
#include "utils/expandeddatum.h"
#include "utils/rel.h"
Go to the source code of this file.
Functions | |
static struct varlena * | toast_fetch_datum (struct varlena *attr) |
static struct varlena * | toast_fetch_datum_slice (struct varlena *attr, int32 sliceoffset, int32 slicelength) |
static struct varlena * | toast_decompress_datum (struct varlena *attr) |
static struct varlena * | toast_decompress_datum_slice (struct varlena *attr, int32 slicelength) |
struct varlena * | detoast_external_attr (struct varlena *attr) |
struct varlena * | detoast_attr (struct varlena *attr) |
struct varlena * | detoast_attr_slice (struct varlena *attr, int32 sliceoffset, int32 slicelength) |
Size | toast_raw_datum_size (Datum value) |
Size | toast_datum_size (Datum value) |
Definition at line 116 of file detoast.c.
References Assert, detoast_external_attr(), palloc(), pfree(), varatt_indirect::pointer, SET_VARSIZE, toast_decompress_datum(), toast_fetch_datum(), VARATT_EXTERNAL_GET_POINTER, VARATT_IS_COMPRESSED, VARATT_IS_EXTENDED, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, VARATT_IS_SHORT, VARDATA, VARDATA_SHORT, VARHDRSZ, VARHDRSZ_SHORT, VARSIZE_ANY, and VARSIZE_SHORT.
Referenced by getdatafield(), pg_detoast_datum(), pg_detoast_datum_copy(), pg_detoast_datum_packed(), toast_flatten_tuple_to_datum(), and toast_tuple_init().
Definition at line 205 of file detoast.c.
References Assert, detoast_external_attr(), elog, ERROR, palloc(), pfree(), pg_add_s32_overflow(), pglz_maximum_compressed_size(), varatt_indirect::pointer, SET_VARSIZE, toast_decompress_datum(), toast_decompress_datum_slice(), toast_fetch_datum(), toast_fetch_datum_slice(), TOAST_PGLZ_COMPRESSION_ID, VARATT_EXTERNAL_GET_COMPRESS_METHOD, VARATT_EXTERNAL_GET_EXTSIZE, VARATT_EXTERNAL_GET_POINTER, VARATT_EXTERNAL_IS_COMPRESSED, VARATT_IS_COMPRESSED, VARATT_IS_EXTERNAL, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, VARATT_IS_SHORT, VARDATA, VARDATA_SHORT, VARHDRSZ, VARHDRSZ_SHORT, VARSIZE, and VARSIZE_SHORT.
Referenced by pg_detoast_datum_slice().
Definition at line 45 of file detoast.c.
References Assert, DatumGetEOHP(), EOH_flatten_into(), EOH_get_flat_size(), palloc(), varatt_indirect::pointer, PointerGetDatum(), toast_fetch_datum(), VARATT_EXTERNAL_GET_POINTER, VARATT_IS_EXTERNAL, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, and VARSIZE_ANY.
Referenced by assign_simple_var(), brin_form_tuple(), detoast_attr(), detoast_attr_slice(), expanded_record_set_field_internal(), expanded_record_set_fields(), index_form_tuple_context(), make_tuple_indirect(), toast_build_flattened_tuple(), toast_flatten_tuple(), toast_tuple_init(), and tstoreReceiveSlot_detoast().
Definition at line 601 of file detoast.c.
References Assert, DatumGetEOHP(), DatumGetPointer(), EOH_get_flat_size(), varatt_indirect::pointer, PointerGetDatum(), value, VARATT_EXTERNAL_GET_EXTSIZE, VARATT_EXTERNAL_GET_POINTER, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, VARATT_IS_SHORT, VARSIZE, and VARSIZE_SHORT.
Referenced by pg_column_size().
Definition at line 471 of file detoast.c.
References Assert, elog, ERROR, lz4_decompress_datum(), pglz_decompress_datum(), TOAST_COMPRESS_METHOD, TOAST_LZ4_COMPRESSION_ID, TOAST_PGLZ_COMPRESSION_ID, and VARATT_IS_COMPRESSED.
Referenced by detoast_attr(), detoast_attr_slice(), and toast_decompress_datum_slice().
|
static |
Definition at line 503 of file detoast.c.
References Assert, elog, ERROR, lz4_decompress_datum_slice(), pglz_decompress_datum_slice(), TOAST_COMPRESS_EXTSIZE, TOAST_COMPRESS_METHOD, toast_decompress_datum(), TOAST_LZ4_COMPRESSION_ID, TOAST_PGLZ_COMPRESSION_ID, and VARATT_IS_COMPRESSED.
Referenced by detoast_attr_slice().
Definition at line 343 of file detoast.c.
References AccessShareLock, elog, ERROR, palloc(), SET_VARSIZE, SET_VARSIZE_COMPRESSED, table_close(), table_open(), table_relation_fetch_toast_slice(), varatt_external::va_toastrelid, varatt_external::va_valueid, VARATT_EXTERNAL_GET_EXTSIZE, VARATT_EXTERNAL_GET_POINTER, VARATT_EXTERNAL_IS_COMPRESSED, VARATT_IS_EXTERNAL_ONDISK, and VARHDRSZ.
Referenced by detoast_attr(), detoast_attr_slice(), and detoast_external_attr().
|
static |
Definition at line 396 of file detoast.c.
References AccessShareLock, Assert, elog, ERROR, palloc(), SET_VARSIZE, SET_VARSIZE_COMPRESSED, table_close(), table_open(), table_relation_fetch_toast_slice(), varatt_external::va_toastrelid, varatt_external::va_valueid, VARATT_EXTERNAL_GET_EXTSIZE, VARATT_EXTERNAL_GET_POINTER, VARATT_EXTERNAL_IS_COMPRESSED, VARATT_IS_EXTERNAL_ONDISK, and VARHDRSZ.
Referenced by detoast_attr_slice().
Definition at line 545 of file detoast.c.
References Assert, DatumGetEOHP(), DatumGetPointer(), EOH_get_flat_size(), varatt_indirect::pointer, PointerGetDatum(), varatt_external::va_rawsize, value, VARATT_EXTERNAL_GET_POINTER, VARATT_IS_COMPRESSED, VARATT_IS_EXTERNAL_EXPANDED, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, VARATT_IS_SHORT, VARDATA_COMPRESSED_GET_EXTSIZE, VARHDRSZ, VARHDRSZ_SHORT, VARSIZE, and VARSIZE_SHORT.
Referenced by bpcharoctetlen(), build_sorted_items(), byteaeq(), byteane(), byteaoctetlen(), compute_array_stats(), compute_distinct_stats(), compute_scalar_stats(), datum_image_eq(), datum_image_hash(), record_image_cmp(), text_length(), text_starts_with(), texteq(), textne(), and textoctetlen().