PostgreSQL Source Code
git master
|
#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_AM_RESERVED_BIT |
#define | INDEX_VAR_MASK 0x4000 |
#define | INDEX_NULL_MASK 0x8000 |
#define | IndexTupleSize(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 |
Typedefs | |
typedef struct IndexTupleData | IndexTupleData |
typedef IndexTupleData * | IndexTuple |
typedef struct IndexAttributeBitMapData | IndexAttributeBitMapData |
typedef IndexAttributeBitMapData * | IndexAttributeBitMap |
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) |
IndexTuple | index_truncate_tuple (TupleDesc sourceDescriptor, IndexTuple source, int leavenatts) |
#define INDEX_AM_RESERVED_BIT |
#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_keep_natts(), _bt_keep_natts_fast(), _bt_load(), _bt_mkscankey(), _hash_checkqual(), bt_normalize_tuple(), comparetup_index_btree(), gintuple_get_attrnum(), gintuple_get_key(), gistchoose(), gistDeCompressAtt(), gistFetchTuple(), gistindex_keytest(), gistMakeUnionItVec(), gistSplitByKey(), readtup_index(), and tuplesort_putindextuplevalues().
#define INDEX_NULL_MASK 0x8000 |
Definition at line 69 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 _bt_dedup_pass(), _bt_form_posting(), _bt_load(), _bt_setuppostingitems(), _bt_truncate(), _bt_update_posting(), bt_page_print_tuples(), BTreeTupleSetPosting(), GinFormInteriorTuple(), GinFormTuple(), index_form_tuple(), and spgFormNodeTuple().
#define INDEX_VAR_MASK 0x4000 |
Definition at line 68 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_print_tuples(), index_deform_tuple(), index_form_tuple(), and nocache_index_getattr().
#define IndexTupleHasNulls | ( | itup | ) | ((((IndexTuple) (itup))->t_info & INDEX_NULL_MASK)) |
Definition at line 72 of file itup.h.
Referenced by bt_page_print_tuples(), GinFormTuple(), index_deform_tuple(), 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_normalize_tuple(), bt_page_print_tuples(), and nocache_index_getattr().
#define IndexTupleSize | ( | itup | ) | ((Size) ((itup)->t_info & INDEX_SIZE_MASK)) |
Definition at line 71 of file itup.h.
Referenced by _bt_buildadd(), _bt_check_third_page(), _bt_dedup_finish_pending(), _bt_dedup_save_htid(), _bt_dedup_start_pending(), _bt_delitems_delete(), _bt_delitems_vacuum(), _bt_doinsert(), _bt_form_posting(), _bt_insert_parent(), _bt_insertonpg(), _bt_mark_page_halfdead(), _bt_recsplitloc(), _bt_restore_page(), _bt_saveitem(), _bt_sort_dedup_finish_pending(), _bt_split(), _bt_truncate(), _hash_doinsert(), _hash_pgaddmultitup(), _hash_splitbucket(), _hash_squeezebucket(), bt_check_level_from_leftmost(), bt_page_print_tuples(), bt_pivot_tuple_identical(), bt_rootdescend(), bt_target_page_check(), bt_tuple_present_callback(), btree_xlog_insert(), btree_xlog_split(), btree_xlog_updates(), BTreeTupleGetHeapTID(), CopyIndexTuple(), decodePageSplitRecord(), entryExecPlaceToPage(), entryIsEnoughSpace(), entrySplitPage(), GetBTPageStatistics(), ginEntryFillRoot(), GinFormInteriorTuple(), GinFormTuple(), ginHeapTupleFastCollect(), ginHeapTupleFastInsert(), ginRedoInsertEntry(), ginRedoInsertListPage(), ginRedoUpdateMetapage(), ginVacuumEntryPage(), gist_indexsortbuild_pagestate_add(), gist_page_items(), gist_page_items_bytea(), gistBuildCallback(), gistfillbuffer(), gistfillitupvec(), gistfitpage(), gistGetItupFromPage(), gistnospace(), gistPlaceItupToPage(), gistplacetopage(), gistRedoPageUpdateRecord(), gistSplit(), gistXLogUpdate(), hash_xlog_move_page_contents(), hash_xlog_squeeze_page(), index_truncate_tuple(), makeSublist(), spgFormInnerTuple(), writeListPage(), and writetup_index().
#define MaxIndexTuplesPerPage |
Definition at line 145 of file itup.h.
Referenced by _bt_delete_or_dedup_one_page(), _bt_delitems_delete(), _bt_delitems_delete_check(), _bt_delitems_vacuum(), _bt_restore_page(), _hash_load_qualified_items(), _hash_readpage(), _hash_splitbucket(), _hash_squeezebucket(), btvacuumpage(), gistgettuple(), gistprunepage(), hashgettuple(), PageIndexMultiDelete(), palloc_btree_page(), spgPageIndexMultiDelete(), storeGettuple(), vacuumLeafPage(), vacuumLeafRoot(), and vacuumRedirectAndPlaceholder().
typedef struct IndexAttributeBitMapData IndexAttributeBitMapData |
typedef IndexTupleData* IndexTuple |
typedef struct IndexTupleData IndexTupleData |
IndexTuple CopyIndexTuple | ( | IndexTuple | source | ) |
Definition at line 510 of file indextuple.c.
References IndexTupleSize, and palloc().
Referenced by _bt_buildadd(), _bt_insert_parent(), _bt_insertonpg(), _bt_load(), _bt_newroot(), _bt_pagedel(), _bt_swap_posting(), _hash_splitbucket(), _hash_squeezebucket(), btree_xlog_insert(), btree_xlog_split(), gistformdownlink(), and index_truncate_tuple().
void index_deform_tuple | ( | IndexTuple | tup, |
TupleDesc | tupleDescriptor, | ||
Datum * | values, | ||
bool * | isnull | ||
) |
Definition at line 434 of file indextuple.c.
References Assert, att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull, attnum, fetchatt, INDEX_MAX_KEYS, IndexInfoFindDataOffset, IndexTupleHasNulls, TupleDescData::natts, IndexTupleData::t_info, and TupleDescAttr.
Referenced by _bt_check_unique(), comparetup_index_btree(), get_actual_variable_endpoint(), gist_page_items(), index_truncate_tuple(), and StoreIndexTuple().
IndexTuple index_form_tuple | ( | TupleDesc | tupleDescriptor, |
Datum * | values, | ||
bool * | isnull | ||
) |
Definition at line 47 of file indextuple.c.
References Assert, DatumGetPointer, detoast_external_attr(), ereport, errcode(), errmsg(), ERROR, heap_compute_data_size(), heap_fill_tuple(), HEAP_HASEXTERNAL, HEAP_HASVARWIDTH, i, INDEX_MAX_KEYS, INDEX_NULL_MASK, INDEX_SIZE_MASK, INDEX_VAR_MASK, IndexInfoFindDataOffset, MAXALIGN, TupleDescData::natts, palloc0(), pfree(), PointerGetDatum, IndexTupleData::t_info, toast_compress_datum(), TOAST_INDEX_HACK, TOAST_INDEX_TARGET, TupleDescAttr, VARATT_IS_EXTENDED, VARATT_IS_EXTERNAL, and VARSIZE.
Referenced by bt_normalize_tuple(), bt_tuple_present_callback(), btinsert(), GinFormTuple(), gistFormTuple(), hashbuildCallback(), hashinsert(), index_truncate_tuple(), and tuplesort_putindextuplevalues().
IndexTuple index_truncate_tuple | ( | TupleDesc | sourceDescriptor, |
IndexTuple | source, | ||
int | leavenatts | ||
) |
Definition at line 539 of file indextuple.c.
References Assert, CopyIndexTuple(), index_deform_tuple(), index_form_tuple(), INDEX_MAX_KEYS, IndexTupleSize, TupleDescData::natts, palloc(), pfree(), IndexTupleData::t_tid, TupleDescCopy(), TupleDescSize, and values.
Referenced by _bt_truncate().
Datum nocache_index_getattr | ( | IndexTuple | tup, |
int | attnum, | ||
TupleDesc | tupleDesc | ||
) |
Definition at line 219 of file indextuple.c.
References Assert, att_addlength_pointer, att_align_nominal, att_align_pointer, att_isnull, attlen, attnum, byte, fetchatt, i, IndexInfoFindDataOffset, IndexTupleHasNulls, IndexTupleHasVarwidths, TupleDescData::natts, IndexTupleData::t_info, and TupleDescAttr.