I wrote:
> I'm kind of baffled as to how it's escaped detection for this long;
> maybe the assertion is overly tight, and the case actually works
> in non-assert builds?
A quick test says that indeed this example works in a non-assert
build. So that may explain the lack of previous reports. Whether
it'd be okay to weaken this check across-the-board isn't clear to me.
regards, tom lane