Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> ... Though this is slightly inconsistent in how it works with a
> bit string, it does seem the most useful approach.
Also, this is a behavior that we changed in 8.0 in response to previous
complaints. Before changing it again, I'd want to see a pretty detailed
analysis of either (1) why the previous complainers were idiots, or
(2) why this change is still compatible with what they asked for ;-)
Where relevant, comments on SQL spec compliance would help the argument
too. I don't think the spec defines any bit<->integer conversions,
but it definitely addresses the issue of converting from bit(m) to bit(n).
regards, tom lane