Re: FETCH FIRST clause PERCENT option - Mailing list pgsql-hackers

From Erik Rijkers
Subject Re: FETCH FIRST clause PERCENT option
Date
Msg-id 1754c1e3713312d54d1ce71777f5b472@xs4all.nl
Whole thread Raw
In response to Re: FETCH FIRST clause PERCENT option  (Surafel Temesgen <surafel3000@gmail.com>)
Responses Re: FETCH FIRST clause PERCENT option  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
On 2019-08-19 11:18, Surafel Temesgen wrote:
> 
> [..]
> 
> [percent-incremental-v7.patch]

Thanks.


Another little thing, not sure it's a bug:

limit interprets its argument by rounding up or down as one would 
expect:

table onek limit 10.4;  --> gives 10 rows
table onek limit 10.6;  --> gives 11 rows

but  FETCH count PERCENT  does not do that; it rounds always up.

select * from (table onek limit 100) f fetch first 10.4 percent rows 
only; --> gives 11 rows
select * from (table onek limit 100) f fetch first 10.6 percent rows 
only; --> gives 11 rows

I see that it's documented in the .sgml to behave as it does, but it 
seems wrong to me;
shouldn't that 10.4-percent-query yield 10 rows instead of 11?


thanks,

Erik Rijkers











pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?
Next
From: movead li
Date:
Subject: Re: Rearranging ALTER TABLE to avoid multi-operations bugs