Fix incorrect computations of length of null bitmap in pageinspect.
authorTom Lane
Thu, 4 Jan 2018 19:59:00 +0000 (14:59 -0500)
committerTom Lane
Thu, 4 Jan 2018 19:59:00 +0000 (14:59 -0500)
commit5ad1b1728767dbf0209b35072db372d19bc032f7
treebc785e68ff8bb20216124490e9c6a565fcb11392
parenta6565da8b9ef2b900d298a19cb817a2c9ca90f7e
Fix incorrect computations of length of null bitmap in pageinspect.

Instead of using our standard macro for this calculation, this code
did it itself ... and got it wrong, leading to incorrect display of
the null bitmap in some cases.  Noted and fixed by Maksim Milyutin.

In passing, remove a uselessly duplicative error check.

Errors were introduced in commit d6061f83a; back-patch to 9.6
where that came in.

Maksim Milyutin, reviewed by Andrey Borodin

Discussion: https://postgr.es/m/ec295792-a69f-350f-6287-25a20e8f31d5@gmail.com
contrib/pageinspect/expected/page.out
contrib/pageinspect/heapfuncs.c
contrib/pageinspect/sql/page.sql