Reduce code duplication between heapgettup and heapgettup_pagemode
authorDavid Rowley <drowley@postgresql.org>
Fri, 3 Feb 2023 03:20:43 +0000 (16:20 +1300)
committerDavid Rowley <drowley@postgresql.org>
Fri, 3 Feb 2023 03:20:43 +0000 (16:20 +1300)
commit7ae0ab0ad9704b10400a611a9af56c63304c27a5
tree6b121edc9d28ad0aefab08916333f39638a29dec
parent3e577ff602fe3438ac60771c4a6d027d881619b0
Reduce code duplication between heapgettup and heapgettup_pagemode

The code to get the next block number was exactly the same between these
two functions, so let's just put it into a helper function and call that
from both locations.

Author: Melanie Plageman
Reviewed-by: Andres Freund, David Rowley
Discussion: https://postgr.es/m/CAAKRu_bvkhka0CZQun28KTqhuUh5ZqY=_T8QEqZqOL02rpi2bw@mail.gmail.com
src/backend/access/heap/heapam.c