Re: FETCH FIRST clause PERCENT option

From: Ryan Lambert <ryan(at)rustprooflabs(dot)com>
To: Surafel Temesgen <surafel3000(at)gmail(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, Mark Dilger <hornschnorter(at)gmail(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 PERCENT option
Date: 2019-08-06 22:52:12
Message-ID: CAN-V+g_pu2cgrM03rwU6y1J2tAMiaVN27Gjv5N6iN7M9_U5Usw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Surafel,

The patch did not did it automatically. Its query writer obligation to do
> that currently

Ok.

Your latest patch [1] passes make installcheck-world, I didn't test the
actual functionality this round.

plan = (Plan *) make_limit(plan,
> subparse->limitOffset,
> - subparse->limitCount);
> + subparse->limitCount,
> + subparse->limitOption);
>

I assume the limit percentage number goes into subparse->limitCount? If
so, I don't see that documented. Or does this truly only store the count?

The remainder of the code seems to make sense. I attached a patch with a
few minor changes in the comments. I need to go back to my notes and see
if I covered all the testing I had thought of, I should get to that later
this week.

[1]
https://www.postgresql.org/message-id/attachment/103028/percent-incremental-v6.patch

*Ryan Lambert*

>

Attachment Content-Type Size
percent-incremental-v6-comment-cleanup.patch application/octet-stream 4.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-08-06 22:53:10 Re: no default hash partition
Previous Message Alvaro Herrera 2019-08-06 22:47:28 remove "msg" parameter from convert_tuples_by_name