#include "postgres.h"
#include "storage/itemptr.h"
Go to the source code of this file.
Functions | |
bool | ItemPointerEquals (ItemPointer pointer1, ItemPointer pointer2) |
int32 | ItemPointerCompare (ItemPointer arg1, ItemPointer arg2) |
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; }