PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> The following query:
> SELECT CAST(B'111111111111100000000' AS BIT VARYING(20)) >>8;
> causes the FailedAssertion exception:
D'oh ... bitshiftright() needs to do the zero-pad-fixup in both
code paths. Will fix it tomorrow.
regards, tom lane