PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "access/relation.h"
#include "catalog/pg_am_d.h"
#include "catalog/pg_type.h"
#include "funcapi.h"
#include "mb/pg_wchar.h"
#include "miscadmin.h"
#include "pageinspect.h"
#include "port/pg_bitutils.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/rel.h"
Go to the source code of this file.
Data Structures | |
struct | heap_page_items_state |
Macros | |
#define | HeapTupleHeaderGetOidOld(tup) |
#define | HEAP_TUPLE_INFOMASK_COLS 2 |
Typedefs | |
typedef struct heap_page_items_state | heap_page_items_state |
Functions | |
static char * | bits_to_text (bits8 *bits, int len) |
static bits8 * | text_to_bits (char *str, int len) |
PG_FUNCTION_INFO_V1 (heap_page_items) | |
Datum | heap_page_items (PG_FUNCTION_ARGS) |
static Datum | tuple_data_split_internal (Oid relid, char *tupdata, uint16 tupdata_len, uint16 t_infomask, uint16 t_infomask2, bits8 *t_bits, bool do_detoast) |
PG_FUNCTION_INFO_V1 (tuple_data_split) | |
Datum | tuple_data_split (PG_FUNCTION_ARGS) |
PG_FUNCTION_INFO_V1 (heap_tuple_infomask_flags) | |
Datum | heap_tuple_infomask_flags (PG_FUNCTION_ARGS) |
#define HEAP_TUPLE_INFOMASK_COLS 2 |
#define HeapTupleHeaderGetOidOld | ( | tup | ) |
Definition at line 46 of file heapfuncs.c.
typedef struct heap_page_items_state heap_page_items_state |
|
static |
Definition at line 62 of file heapfuncs.c.
References i, len, palloc(), and generate_unaccent_rules::str.
Referenced by heap_page_items().
Datum heap_page_items | ( | PG_FUNCTION_ARGS | ) |
Definition at line 130 of file heapfuncs.c.
References BITMAPLEN, BITS_PER_BYTE, bits_to_text(), FuncCallContext::call_cntr, CStringGetTextDatum, elog(), ereport, errcode(), errmsg(), ERROR, FirstOffsetNumber, get_call_result_type(), heap_form_tuple(), HEAP_HASNULL, HEAP_HASOID_OLD, HeapTupleGetDatum(), HeapTupleHeaderGetNatts, HeapTupleHeaderGetOidOld, HeapTupleHeaderGetRawCommandId, HeapTupleHeaderGetRawXmax, HeapTupleHeaderGetRawXmin, i, ItemIdGetFlags, ItemIdGetLength, ItemIdGetOffset, ItemIdHasStorage, FuncCallContext::max_calls, MAXALIGN, MemoryContextSwitchTo(), MinHeapTupleSize, FuncCallContext::multi_call_memory_ctx, heap_page_items_state::offset, heap_page_items_state::page, PageGetItem(), PageGetItemId(), PageGetMaxOffsetNumber(), palloc(), PG_GETARG_BYTEA_P, PointerGetDatum(), SET_VARSIZE, SizeofHeapTupleHeader, SizeOfPageHeaderData, SRF_FIRSTCALL_INIT, SRF_IS_FIRSTCALL, SRF_PERCALL_SETUP, SRF_RETURN_DONE, SRF_RETURN_NEXT, superuser(), HeapTupleHeaderData::t_bits, HeapTupleHeaderData::t_ctid, HeapTupleHeaderData::t_hoff, HeapTupleHeaderData::t_infomask, HeapTupleHeaderData::t_infomask2, heap_page_items_state::tupd, TYPEFUNC_COMPOSITE, UInt16GetDatum(), UInt32GetDatum(), UInt8GetDatum(), FuncCallContext::user_fctx, values, VARDATA, VARHDRSZ, and VARSIZE.
Datum heap_tuple_infomask_flags | ( | PG_FUNCTION_ARGS | ) |
Definition at line 507 of file heapfuncs.c.
References a, Assert(), construct_array_builtin(), construct_empty_array(), CStringGetTextDatum, elog(), ereport, errcode(), errmsg(), ERROR, get_call_result_type(), HEAP_COMBOCID, heap_form_tuple(), HEAP_HASEXTERNAL, HEAP_HASNULL, HEAP_HASOID_OLD, HEAP_HASVARWIDTH, HEAP_HOT_UPDATED, HEAP_KEYS_UPDATED, HEAP_MOVED, HEAP_MOVED_IN, HEAP_MOVED_OFF, HEAP_ONLY_TUPLE, HEAP_TUPLE_INFOMASK_COLS, HEAP_UPDATED, HEAP_XMAX_COMMITTED, HEAP_XMAX_EXCL_LOCK, HEAP_XMAX_INVALID, HEAP_XMAX_IS_MULTI, HEAP_XMAX_KEYSHR_LOCK, HEAP_XMAX_LOCK_ONLY, HEAP_XMAX_SHR_LOCK, HEAP_XMIN_COMMITTED, HEAP_XMIN_FROZEN, HEAP_XMIN_INVALID, HeapTupleGetDatum(), MemSet, palloc0(), pfree(), PG_GETARG_INT16, pg_popcount(), PG_RETURN_DATUM, PointerGetDatum(), superuser(), TYPEFUNC_COMPOSITE, and values.
PG_FUNCTION_INFO_V1 | ( | heap_page_items | ) |
PG_FUNCTION_INFO_V1 | ( | heap_tuple_infomask_flags | ) |
PG_FUNCTION_INFO_V1 | ( | tuple_data_split | ) |
|
static |
Definition at line 85 of file heapfuncs.c.
References ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, len, palloc(), pg_mblen(), and generate_unaccent_rules::str.
Referenced by tuple_data_split().
Datum tuple_data_split | ( | PG_FUNCTION_ARGS | ) |
Definition at line 423 of file heapfuncs.c.
References BITMAPLEN, BITS_PER_BYTE, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, HEAP_HASNULL, HEAP_NATTS_MASK, pfree(), PG_ARGISNULL, PG_GETARG_BOOL, PG_GETARG_BYTEA_P, PG_GETARG_INT16, PG_GETARG_OID, PG_GETARG_TEXT_PP, PG_NARGS, PG_RETURN_DATUM, PG_RETURN_NULL, res, superuser(), text_to_bits(), text_to_cstring(), tuple_data_split_internal(), VARHDRSZ, and VARSIZE.
|
static |
Definition at line 304 of file heapfuncs.c.
References AccessShareLock, accumArrayResult(), att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull(), CurrentMemoryContext, ereport, errcode(), ERRCODE_DATA_CORRUPTED, errmsg(), ERROR, HEAP_HASNULL, HEAP_NATTS_MASK, i, initArrayResult(), len, makeArrayResult(), TupleDescData::natts, palloc(), pfree(), pg_detoast_datum_copy(), PointerGetDatum(), RelationData::rd_rel, relation_close(), relation_open(), RelationGetDescr, SET_VARSIZE, TupleDescAttr, VARATT_IS_EXTERNAL, VARATT_IS_EXTERNAL_INDIRECT, VARATT_IS_EXTERNAL_ONDISK, VARDATA, VARHDRSZ, and VARSIZE_ANY.
Referenced by tuple_data_split().