Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> Here's a tidier version with a comment and commit message.
It seems a little weird to make the join-type test be the first one
in the if() condition: it doesn't seem like the most important thing
to test, and it doesn't agree with the way you've worded the comment.
Otherwise +1.
regards, tom lane