Gaetano Mendola wrote:
Tom Lane wrote:
We could fix this by changing the declarations of the "maxoff" variables
to int, but I think it's probably cleaner to recode
PageGetMaxOffsetNumber like so:
#define PageGetMaxOffsetNumber(page) \
(((PageHeader) (page))->pd_lower <= SizeOfPageHeaderData ? 0
Tom Lane wrote:
I was just looking at this macro:
/*
* PageGetMaxOffsetNumber
*Returns the maximum offset number used by the given page.
*Since offset numbers are 1-based, this is also the number
*of items on the page.
*
*NOTE: to ensure sane behavior if the pa