On Tue, 10 Jan 2023 at 16:07, Richard Guo <guofengli...@gmail.com> wrote: > Sorry I didn't make myself clear. I mean currently on HEAD in planner.c > from line 4847 to line 4857, we have the code to make sure we always use > the more rigorous clause for explicit-sort case. I think this code is > not necessary, because we have already done that in line 4791 to 4796, > for both DISTINCT ON and standard DISTINCT.
Thanks for explaining. I'm unsure if that code ever did anything useful, but I agree that it does nothing now. >> I've attached an updated patch > > > The patch looks good to me. Thanks for having another look. I've now pushed the patch. David