From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | tomas(dot)vondra(at)2ndquadrant(dot)com |
Cc: | ryan(at)rustprooflabs(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org, surafel3000(at)gmail(dot)com |
Subject: | Re: FETCH FIRST clause PERCENT option |
Date: | 2020-01-17 06:20:08 |
Message-ID: | 20200117.152008.415372908548273693.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Thank you for the notification, Tomas.
At Thu, 16 Jan 2020 22:33:58 +0100, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> wrote in
> This patch is marked as RFC since September. Since then there was no
> discussion on this thread, but Andrew proposed an alternative approach
> based on window functions in a separate thread [1] (both for this and
> for the WITH TIES case).
>
> I'll set this patch back to "needs review" - at this point we need to
> decide which of the approaches is the right one.
Even consdiering that we have only two usage , WITH TIES and PERCENT,
of the mechanism for now, I like [1] for the generic nature,
simpleness and smaller invasiveness to executor. The fact that cursor
needs materialize to allow backward scan would not be a big problem.
It seems that PERCENT will be easily implemented on that.
However, isn't there a possibility that we allow FETCH FIRST x PERCENT
WITH TIES, though I'm not sure what SQL spec tells about that? I
don't come up right now how to do that using window functions..
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2020-01-17 06:54:29 | Re: SQL/JSON: functions |
Previous Message | Pengzhou Tang | 2020-01-17 06:13:59 | Re: Errors when update a view with conditional-INSTEAD rules |