Re: FETCH FIRST clause PERCENT option

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Surafel Temesgen <surafel3000(at)gmail(dot)com>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, vik(dot)fearing(at)2ndquadrant(dot)com, Mark Dilger <hornschnorter(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, andrew(at)tao11(dot)riddles(dot)org(dot)uk
Subject: Re: FETCH FIRST clause PERCENT option
Date: 2019-03-31 21:57:37
Message-ID: 22522.1554069457@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
>> offset_clause:
>> @@ -15435,6 +15442,7 @@ reserved_keyword:
>> | ONLY
>> | OR
>> | ORDER
>> + | PERCENT
>> | PLACING
>> | PRIMARY
>> | REFERENCES

> Are we really ok with adding a new reserved keyword 'PERCENT' for this?

I'm not. It doesn't look like it ought to be necessary to reserve it,
either, given that we don't have to reduce the production right there.

(If that doesn't work right away, try getting rid of row_or_rows
in favor of spelling out those alternatives in separate productions.)

More generally: using an undocumented list as the data structure for
select_limit's result was already a pretty bad idea, I think, and
this patch certainly makes it totally unreadable. Probably ought
to refactor that to use some sort of struct.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2019-03-31 22:31:58 Re: [HACKERS] WAL logging problem in 9.4.3?
Previous Message Andreas Karlsson 2019-03-31 21:49:51 Re: DWIM mode for psql