I wrote:
> I'm inclined to think we have to reject cases like this.
Concretely, about like this. I noticed that the adjacent error
cases in RewriteQuery were mostly not covered either by the
regression tests, so I added tests to hit them all.
regards, tom lane