seth-p(at)outlook(dot)com writes:
> Query (A-D) (with DISTINCT) should not return more rows than query (A) (the
> identical query without DISTINCT), so clearly something is wrong there.
That does seem fishy, but unless you can provide a self-contained test
case, it's unlikely that we are going to be able to magically locate
the problem. I'd suggest seeing if you can reproduce the issue with
some obfuscated or randomly-generated data.
regards, tom lane