#include "storage/block.h"
#include "storage/off.h"
Go to the source code of this file.
Data Structures | |
struct | ItemPointerData |
Defines | |
#define | SizeOfIptrData (offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber)) |
#define | ItemPointerIsValid(pointer) ((bool) (PointerIsValid(pointer) && ((pointer)->ip_posid != 0))) |
#define | ItemPointerGetBlockNumber(pointer) |
#define | ItemPointerGetOffsetNumber(pointer) |
#define | ItemPointerSet(pointer, blockNumber, offNum) |
#define | ItemPointerSetBlockNumber(pointer, blockNumber) |
#define | ItemPointerSetOffsetNumber(pointer, offsetNumber) |
#define | ItemPointerCopy(fromPointer, toPointer) |
#define | ItemPointerSetInvalid(pointer) |
Typedefs | |
typedef struct ItemPointerData | ItemPointerData |
typedef ItemPointerData * | ItemPointer |
Functions | |
bool | ItemPointerEquals (ItemPointer pointer1, ItemPointer pointer2) |
int32 | ItemPointerCompare (ItemPointer arg1, ItemPointer arg2) |
#define ItemPointerCopy | ( | fromPointer, | ||
toPointer | ||||
) |
( \ AssertMacro(PointerIsValid(toPointer)), \ AssertMacro(PointerIsValid(fromPointer)), \ *(toPointer) = *(fromPointer) \ )
Definition at line 120 of file itemptr.h.
Referenced by AfterTriggerExecute(), AfterTriggerSaveEvent(), currtid_byrelname(), currtid_byreloid(), heap_lock_tuple(), and heap_lock_updated_tuple_rec().
#define ItemPointerGetBlockNumber | ( | pointer | ) |
( \ AssertMacro(ItemPointerIsValid(pointer)), \ BlockIdGetBlockNumber(&(pointer)->ip_blkid) \ )
Definition at line 69 of file itemptr.h.
Referenced by _bt_get_endpoint(), _bt_insertonpg(), _bt_pagedel(), _bt_search(), btree_xlog_delete_get_latestRemovedXid(), btree_xlog_delete_page(), btree_xlog_insert(), btree_xlog_newroot(), CheckForSerializableConflictIn(), compare_rows(), comparetup_index_btree(), comparetup_index_hash(), ConditionalLockTuple(), doPickSplit(), GetTupleForTrigger(), gingetbitmap(), gistBufferingFindCorrectParent(), gistbufferinginserttuples(), gistbulkdelete(), gistdoinsert(), gistFindCorrectParent(), gistFindPath(), gistGetMaxLevel(), gistMemorizeAllDownlinks(), gistProcessItup(), gistScanPage(), heap_delete(), heap_desc(), heap_fetch(), heap_get_latest_tid(), heap_hot_search(), heap_hot_search_buffer(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_prune_chain(), heap_update(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_update(), heapgettup(), heapgettup_pagemode(), index_fetch_heap(), index_getnext(), IndexOnlyNext(), ItemPointerEquals(), itemptr_comparator(), lazy_vacuum_heap(), lazy_vacuum_page(), LockTuple(), out_target(), PredicateLockTuple(), PrintCatCacheLeakWarning(), setRedirectionTuple(), spgMatchNodeAction(), spgprocesspending(), spgWalk(), tbm_add_tuples(), TidListCreate(), UnlockTuple(), vac_cmp_itemptr(), and validate_index_heapscan().
#define ItemPointerGetOffsetNumber | ( | pointer | ) |
( \ AssertMacro(ItemPointerIsValid(pointer)), \ (pointer)->ip_posid \ )
Definition at line 79 of file itemptr.h.
Referenced by _bt_insertonpg(), _hash_first(), _hash_next(), _hash_step(), bitgetpage(), btree_xlog_delete_get_latestRemovedXid(), btree_xlog_delete_page(), btree_xlog_insert(), btree_xlog_newroot(), CheckForSerializableConflictIn(), compare_rows(), comparetup_index_btree(), comparetup_index_hash(), ConditionalLockTuple(), doPickSplit(), fill_seq_with_data(), GetTupleForTrigger(), hashgetbitmap(), hashgettuple(), heap_delete(), heap_desc(), heap_fetch(), heap_get_latest_tid(), heap_get_root_tuples(), heap_hot_search_buffer(), heap_inplace_update(), heap_insert(), heap_lock_tuple(), heap_multi_insert(), heap_prune_chain(), heap_update(), heap_xlog_delete(), heap_xlog_inplace(), heap_xlog_insert(), heap_xlog_lock(), heap_xlog_lock_updated(), heap_xlog_update(), heapgettup(), heapgettup_pagemode(), IndexBuildHeapScan(), ItemPointerEquals(), itemptr_comparator(), lazy_vacuum_page(), LockTuple(), log_heap_update(), out_target(), PredicateLockTuple(), PrintCatCacheLeakWarning(), spgMatchNodeAction(), spgprocesspending(), spgWalk(), tbm_add_tuples(), UnlockTuple(), vac_cmp_itemptr(), and validate_index_heapscan().
#define ItemPointerIsValid | ( | pointer | ) | ((bool) (PointerIsValid(pointer) && ((pointer)->ip_posid != 0))) |
Definition at line 62 of file itemptr.h.
Referenced by _hash_step(), AfterTriggerExecute(), doPickSplit(), entryGetNextItem(), execCurrentOf(), ExecLockRows(), ginInsertBAEntries(), hashgettuple(), heap_delete(), heap_get_latest_tid(), heap_restrpos(), heap_update(), PLy_procedure_argument_valid(), processPendingPage(), raw_heap_insert(), spgMatchNodeAction(), spgprocesspending(), spgWalk(), TidListCreate(), vacuumLeafPage(), and vacuumLeafRoot().
#define ItemPointerSet | ( | pointer, | ||
blockNumber, | ||||
offNum | ||||
) |
( \ AssertMacro(PointerIsValid(pointer)), \ BlockIdSet(&((pointer)->ip_blkid), blockNumber), \ (pointer)->ip_posid = offNum \ )
Definition at line 89 of file itemptr.h.
Referenced by _bt_buildadd(), _bt_insert_parent(), _bt_insertonpg(), _bt_newroot(), _bt_pagedel(), _bt_parent_deletion_safe(), _bt_uppershutdown(), _hash_step(), acquire_sample_rows(), bitgetpage(), BitmapHeapNext(), btree_xlog_delete_page(), doPickSplit(), entryGetItem(), heap_page_is_all_visible(), heapgetpage(), heapgettup(), heapgettup_pagemode(), lazy_scan_heap(), raw_heap_insert(), RelationPutHeapTuple(), resetSpGistScanOpaque(), setRedirectionTuple(), spgFormDeadTuple(), spgUpdateNodeLink(), tidin(), and tidrecv().
#define ItemPointerSetBlockNumber | ( | pointer, | ||
blockNumber | ||||
) |
( \ AssertMacro(PointerIsValid(pointer)), \ BlockIdSet(&((pointer)->ip_blkid), blockNumber) \ )
Definition at line 100 of file itemptr.h.
Referenced by gistformdownlink(), gistplacetopage(), and heap_xlog_multi_insert().
#define ItemPointerSetInvalid | ( | pointer | ) |
( \ AssertMacro(PointerIsValid(pointer)), \ BlockIdSet(&((pointer)->ip_blkid), InvalidBlockNumber), \ (pointer)->ip_posid = InvalidOffsetNumber \ )
Definition at line 131 of file itemptr.h.
Referenced by _hash_first(), _hash_step(), AfterTriggerSaveEvent(), end_heap_rewrite(), entryGetItem(), entryGetNextItem(), EvalPlanQualFetchRowMarks(), exec_move_row_from_datum(), ExecDelete(), ExecEvalFieldStore(), ExecLockRows(), ExecUpdate(), get_tuple_from_datum(), GetAttributeByName(), GetAttributeByNum(), hashbeginscan(), hashrescan(), heap_form_tuple(), heap_markpos(), heap_tuple_from_minimal_tuple(), hstore_from_record(), hstore_populate_record(), InitPlan(), initscan(), json_populate_record(), PLy_typeinfo_init(), populate_recordset_object_end(), processPendingPage(), record_cmp(), record_eq(), record_out(), record_send(), RelationGetIndexScan(), rewrite_heap_tuple(), scanGetCandidate(), spgFormDeadTuple(), spgFormNodeTuple(), spgRedoVacuumRedirect(), toast_flatten_tuple_attribute(), and vacuumRedirectAndPlaceholder().
#define ItemPointerSetOffsetNumber | ( | pointer, | ||
offsetNumber | ||||
) |
( \ AssertMacro(PointerIsValid(pointer)), \ (pointer)->ip_posid = (offsetNumber) \ )
Definition at line 110 of file itemptr.h.
Referenced by gistFormTuple(), hashgettuple(), heap_hot_search_buffer(), heap_xlog_multi_insert(), IndexBuildHeapScan(), and validate_index_heapscan().
#define SizeOfIptrData (offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber)) |
Definition at line 48 of file itemptr.h.
Referenced by gincostestimate(), and TidListCreate().
typedef ItemPointerData* ItemPointer |
typedef struct ItemPointerData ItemPointerData |
int32 ItemPointerCompare | ( | ItemPointer | arg1, | |
ItemPointer | arg2 | |||
) |
Definition at line 45 of file itemptr.c.
References BlockIdGetBlockNumber, ItemPointerData::ip_blkid, and ItemPointerData::ip_posid.
Referenced by _bt_check_unique(), bttidcmp(), tideq(), tidge(), tidgt(), tidlarger(), tidle(), tidlt(), tidne(), tidsmaller(), and validate_index_heapscan().
{ /* * Don't use ItemPointerGetBlockNumber or ItemPointerGetOffsetNumber here, * because they assert ip_posid != 0 which might not be true for a * user-supplied TID. */ BlockNumber b1 = BlockIdGetBlockNumber(&(arg1->ip_blkid)); BlockNumber b2 = BlockIdGetBlockNumber(&(arg2->ip_blkid)); if (b1 < b2) return -1; else if (b1 > b2) return 1; else if (arg1->ip_posid < arg2->ip_posid) return -1; else if (arg1->ip_posid > arg2->ip_posid) return 1; else return 0; }
bool ItemPointerEquals | ( | ItemPointer | pointer1, | |
ItemPointer | pointer2 | |||
) |
Definition at line 29 of file itemptr.c.
References ItemPointerGetBlockNumber, and ItemPointerGetOffsetNumber.
Referenced by _bt_killitems(), check_exclusion_constraint(), collectMatchesForHeapRow(), compile_pltcl_function(), EvalPlanQualFetch(), ExecDelete(), ExecLockRows(), ExecUpdate(), GetTupleForTrigger(), gistplacetopage(), hashgettuple(), heap_get_latest_tid(), heap_lock_updated_tuple(), heap_lock_updated_tuple_rec(), lookup_C_func(), plpgsql_compile(), PLy_procedure_argument_valid(), PLy_procedure_valid(), processPendingPage(), rewrite_heap_tuple(), scanGetCandidate(), SearchCatCacheList(), spgAddPendingTID(), TidListCreate(), and validate_plperl_function().
{ if (ItemPointerGetBlockNumber(pointer1) == ItemPointerGetBlockNumber(pointer2) && ItemPointerGetOffsetNumber(pointer1) == ItemPointerGetOffsetNumber(pointer2)) return true; else return false; }