David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> I think we should probably include the logic to test for set returning
> functions into query_is_distinct_for.
It strikes me that there's only a problem if the SRF is in a tlist entry
that is not one of the DISTINCT or GROUP BY columns, respectively. It
may not be worth the extra complexity to figure that out, though.
regards, tom lane