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:57 +0000 (19:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 12 Dec 2009 19:24:57 +0000 (19:24 +0000)
commit6780cd23fb1b1d9d345e6ad570162217989553e8
tree5926f28ebf84d073245ea6334170db25e4918ca0
parent0cea93188e390b7408c60aa30d42a9f80c8286d3
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