Re: FETCH FIRST clause PERCENT option
От | Surafel Temesgen |
---|---|
Тема | Re: FETCH FIRST clause PERCENT option |
Дата | |
Msg-id | CALAY4q9TdEpQo+FLJ6OQWK3fF58W_ROGc4-+wpz+ZiSWXQQApA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: FETCH FIRST clause PERCENT option (Vik Fearing <vik.fearing@2ndquadrant.com>) |
Ответы |
Re: FETCH FIRST clause PERCENT option
Re: FETCH FIRST clause PERCENT option |
Список | pgsql-hackers |
On Sun, Nov 25, 2018 at 1:24 PM Vik Fearing <vik.fearing@2ndquadrant.com> wrote:
Also, this query returns 210 rows instead of the expected 208:
select *
from generate_series(1, 1000)
fetch first 20.8 percent rows only
this is because fetch first values work with integer and it change fractional number to nearest integer number like select * from generate_series(1, 1000) fetch first 20.3 rows only; is not an error rather it return 20 rows.
As for the design, I think you should put some serious consideration
into Andrew Gierth's approach. I would rather see something like that.
I didn't go in that direction because I don’t understand why this approach is inferior to using window function and I am not fully understand on how to implement it.
regards
Surafel
В списке pgsql-hackers по дате отправления: