Fix integer-to-bit-string conversions to handle the first fractional byte
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Dec 2009 19:24:35 +0000 (19:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Dec 2009 19:24:35 +0000 (19:24 +0000)
commita4e035b2f1313b268dc6b8a1ff908cdd5ad96625
tree77fa45071416dbfa7879f189a7394069c05cce02
parent02490d4692c46bee3e9279e79c5d07c576d2a32c
Fix integer-to-bit-string conversions to handle the first fractional byte
correctly when the output bit width is wider than the given integer by
something other than a multiple of 8 bits.

This has been wrong since I first wrote that code for 8.0 :-(.  Kudos to
Roman Kononov for being the first to notice, though I didn't use his
patch.  Per bug #5237.
src/backend/utils/adt/varbit.c