Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant
Date
Msg-id CAMbWs49ARdmTAbjNLU7tKgGiSerP8vdcFgsu7ZJvBY_pe7FP=g@mail.gmail.com
Whole thread Raw
In response to Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers

On Thu, Oct 13, 2022 at 4:41 AM David Rowley <dgrowleyml@gmail.com> wrote:
We could do something like set some bool flag in PlannerInfo to tell
the planner not to bother adding the final LimitPath as we've already
added another which does the job, but is it really worth adding that
complexity for this patch? You already mentioned that "this patch is
very straightforward". I don't think it would be if we added code to
avoid the LimitPath duplication.
 
Yeah, maybe this is the right way to do it. I agree that this would
complicate the code. Not sure if it's worth doing.

Thanks
Richard

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: how to correctly react on exception in pfree function?
Next
From: Richard Guo
Date:
Subject: Re: Use LIMIT instead of Unique for DISTINCT when all distinct pathkeys are redundant