Philip Warner <pjw@rhyme.com.au> writes:
> select B'10' | B'1';
> is currently illegal.
> ISTM we should return B'11' for this. ie. build the smallest varbit that
> contains the result, and return it.
Why would that be the correct answer and not B'10' --- ie, which end of
the shorter string should get padded? If anything I'd expect to see
padding added on the right.
> Doesn't seem too unreasonable to support varbit<->numeric conversions.
Aren't those there already for conversions to/from int4 and int8? What
else would you want?
regards, tom lane