On Fri, 15 Jul 2022 at 10:31, Bruce Momjian <br...@momjian.us> wrote:
> for non-Assert builds, ItemPointerGetOffsetNumberNoCheck() and
> ItemPointerGetOffsetNumber() are the same, so I don't see the point to
> making this change.  Frankly, I don't know why we even have two
> functions for this.  I am guessing ItemPointerGetOffsetNumberNoCheck is
> for cases where you have an Assert build and do not want the check.

We'll want to use ItemPointerGetOffsetNumberNoCheck() where the TID
comes from sources we can't verify. e.g user input... '(2,0)'::tid.
We want to use ItemPointerGetOffsetNumber() for item pointers that
come from locations that we want to ensure are correct.  e.g TIDs
we're storing in an index.

David


Reply via email to