Re: query_is_distinct_for does not take into account set returning functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: query_is_distinct_for does not take into account set returning functions
Date: 2014-07-08 14:45:13
Message-ID: 7496.1404830713@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-07-08 15:19:31 Re: LEFT JOINs not optimized away when not needed
Previous Message Tom Lane 2014-07-08 14:27:27 Re: Extending constraint exclusion for implied constraints/conditions