Re: FETCH FIRST clause WITH TIES option

From: Surafel Temesgen <surafel3000(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Subject: Re: FETCH FIRST clause WITH TIES option
Date: 2019-11-27 09:11:13
Message-ID: CALAY4q8y3sLEEqWmLcLT0u5pdiebCdQd8BVuWbpLfqBYJ8zujQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 26, 2019 at 6:09 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:

> I rebased this patch, and my proposed changes are in 0002.
>

Thank you

>
> Looking at the changes in ExecLimit, I'm wondering if it would be better
> to add a new state to the state machine there -- instead of doing all
> the work in duplicative code in the LIMIT_INWINDOW case, have that one
> only save the current end-of-window tuple and jump to
> LIMIT_WINDOWEND_WITH_TIE (or something) which then returns all tuples that
> match the current one. I think that would end up being cleaner. Please
> research.
>

Done
regards
Surafel

Attachment Content-Type Size
fetch_first_with_ties_v13.patch text/x-patch 36.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-11-27 09:14:16 Re: psql - improve test coverage from 41% to 88%
Previous Message Amit Khandekar 2019-11-27 08:46:16 Re: logical decoding : exceeded maxAllocatedDescs for .spill files