#include "access/tupdesc.h"#include "access/tupmacs.h"#include "storage/bufpage.h"#include "storage/itemptr.h"

Go to the source code of this file.
Data Structures | |
| struct | IndexTupleData |
| struct | IndexAttributeBitMapData |
Macros | |
| #define | INDEX_SIZE_MASK 0x1FFF |
| #define | INDEX_VAR_MASK 0x4000 |
| #define | INDEX_NULL_MASK 0x8000 |
| #define | IndexTupleSize(itup) ((Size) (((IndexTuple) (itup))->t_info & INDEX_SIZE_MASK)) |
| #define | IndexTupleDSize(itup) ((Size) ((itup).t_info & INDEX_SIZE_MASK)) |
| #define | IndexTupleHasNulls(itup) ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK)) |
| #define | IndexTupleHasVarwidths(itup) ((((IndexTuple) (itup))->t_info & INDEX_VAR_MASK)) |
| #define | IndexInfoFindDataOffset(t_info) |
| #define | index_getattr(tup, attnum, tupleDesc, isnull) |
| #define | MaxIndexTuplesPerPage |
Functions | |
| IndexTuple | index_form_tuple (TupleDesc tupleDescriptor, Datum *values, bool *isnull) |
| Datum | nocache_index_getattr (IndexTuple tup, int attnum, TupleDesc tupleDesc) |
| void | index_deform_tuple (IndexTuple tup, TupleDesc tupleDescriptor, Datum *values, bool *isnull) |
| IndexTuple | CopyIndexTuple (IndexTuple source) |
| #define index_getattr | ( | tup, | |
| attnum, | |||
| tupleDesc, | |||
| isnull | |||
| ) |
Definition at line 100 of file itup.h.
Referenced by _bt_check_rowcompare(), _bt_checkkeys(), _bt_compare(), _bt_isequal(), _bt_load(), _bt_mkscankey(), _hash_checkqual(), comparetup_index_btree(), copytup_index(), gintuple_get_attrnum(), gintuple_get_key(), gistchoose(), gistDeCompressAtt(), gistindex_keytest(), gistMakeUnionItVec(), gistSplitByKey(), index_deform_tuple(), readtup_index(), and StoreIndexTuple().
| #define INDEX_NULL_MASK 0x8000 |
Definition at line 68 of file itup.h.
Referenced by index_form_tuple(), and spgFormNodeTuple().
| #define INDEX_SIZE_MASK 0x1FFF |
Definition at line 65 of file itup.h.
Referenced by GinFormInteriorTuple(), GinFormTuple(), GinShortenTuple(), index_form_tuple(), and spgFormNodeTuple().
| #define INDEX_VAR_MASK 0x4000 |
Definition at line 67 of file itup.h.
Referenced by index_form_tuple().
| #define IndexInfoFindDataOffset | ( | t_info | ) |
Definition at line 80 of file itup.h.
Referenced by _hash_get_indextuple_hashkey(), bt_page_items(), index_form_tuple(), and nocache_index_getattr().
| #define IndexTupleDSize | ( | itup | ) | ((Size) ((itup).t_info & INDEX_SIZE_MASK)) |
Definition at line 71 of file itup.h.
Referenced by _bt_buildadd(), _bt_findinsertloc(), _bt_insertonpg(), _bt_restore_page(), _hash_doinsert(), _hash_splitbucket(), and _hash_squeezebucket().
| #define IndexTupleHasNulls | ( | itup | ) | ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK)) |
Definition at line 72 of file itup.h.
Referenced by bt_page_items(), GinFormTuple(), hashbuildCallback(), hashinsert(), nocache_index_getattr(), and spgExtractNodeLabels().
| #define IndexTupleHasVarwidths | ( | itup | ) | ((((IndexTuple) (itup))->t_info & INDEX_VAR_MASK)) |
Definition at line 73 of file itup.h.
Referenced by bt_page_items(), and nocache_index_getattr().
| #define IndexTupleSize | ( | itup | ) | ((Size) (((IndexTuple) (itup))->t_info & INDEX_SIZE_MASK)) |
Definition at line 70 of file itup.h.
Referenced by _bt_saveitem(), _bt_split(), bt_page_items(), btree_xlog_split(), CopyIndexTuple(), copytup_index(), decodePageSplitRecord(), entryIsEnoughSpace(), entryPlaceToPage(), entrySplitPage(), GetBTPageStatistics(), ginEntryFillRoot(), GinFormInteriorTuple(), GinFormTuple(), ginHeapTupleFastCollect(), ginHeapTupleFastInsert(), ginRedoInsert(), ginRedoInsertListPage(), ginRedoSplit(), ginRedoUpdateMetapage(), ginRedoVacuumPage(), ginVacuumEntryPage(), gistBuildCallback(), gistfillbuffer(), gistfillitupvec(), gistfitpage(), gistGetItupFromPage(), gistnospace(), gistPlaceItupToPage(), gistplacetopage(), gistRedoPageUpdateRecord(), gistXLogUpdate(), makeSublist(), spgFormInnerTuple(), writeListPage(), writetup_index(), and xlogVacuumPage().
| #define MaxIndexTuplesPerPage |
Definition at line 136 of file itup.h.
Referenced by _bt_readpage(), btgettuple(), storeGettuple(), vacuumLeafPage(), vacuumLeafRoot(), and vacuumRedirectAndPlaceholder().
| typedef struct IndexTupleData IndexTupleData |
| IndexTuple CopyIndexTuple | ( | IndexTuple | source | ) |
Definition at line 427 of file indextuple.c.
References IndexTupleSize, and palloc().
Referenced by _bt_buildadd(), _bt_insert_parent(), _bt_newroot(), _bt_pagedel(), and gistformdownlink().
| void index_deform_tuple | ( | IndexTuple | tup, |
| TupleDesc | tupleDescriptor, | ||
| Datum * | values, | ||
| bool * | isnull | ||
| ) |
Definition at line 409 of file indextuple.c.
References Assert, i, index_getattr, INDEX_MAX_KEYS, and tupleDesc::natts.
Referenced by _bt_check_unique(), and comparetup_index_btree().
| IndexTuple index_form_tuple | ( | TupleDesc | tupleDescriptor, |
| Datum * | values, | ||
| bool * | isnull | ||
| ) |
Definition at line 34 of file indextuple.c.
References tupleDesc::attrs, DatumGetPointer, ereport, errcode(), errmsg(), ERROR, heap_compute_data_size(), heap_fill_tuple(), HEAP_HASVARWIDTH, heap_tuple_fetch_attr(), i, INDEX_MAX_KEYS, INDEX_NULL_MASK, INDEX_SIZE_MASK, INDEX_VAR_MASK, IndexInfoFindDataOffset, MAXALIGN, tupleDesc::natts, NULL, palloc0(), pfree(), PointerGetDatum, IndexTupleData::t_info, toast_compress_datum(), TOAST_INDEX_HACK, TOAST_INDEX_TARGET, VARATT_IS_EXTENDED, VARATT_IS_EXTERNAL, and VARSIZE.
Referenced by _hash_form_tuple(), btbuildCallback(), btinsert(), GinFormTuple(), gistFormTuple(), and storeGettuple().
| Datum nocache_index_getattr | ( | IndexTuple | tup, |
| int | attnum, | ||
| TupleDesc | tupleDesc | ||
| ) |
Definition at line 201 of file indextuple.c.
References Assert, att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull, tupleDesc::attrs, byte, fetchatt, i, IndexInfoFindDataOffset, IndexTupleHasNulls, IndexTupleHasVarwidths, tupleDesc::natts, NULL, and IndexTupleData::t_info.