On 2018-08-28 14:14, Surafel Temesgen wrote:
On Tue, Aug 21, 2018 at 3:50 PM Andres Freund <and...@anarazel.de>
wrote:
Imagine volatile functions being used. That can be problematic because
of repeated side-effects, but also will lead to plainly wrong
results. Consider what happens with your approach where somebody does
something like WHERE value < random().
Thanks for explaining . The attach patch use tuplestore instead
[fetch-wth-percent-v2.patch]
I had a quick look at this. Apply, compile, make check are ok.
In straightforward usage seems to work ok.
But I also ran across this crash:
create table if not exists t as
select i from generate_series(1, 100) as f(i);
select * from t
offset 60 rows
fetch next 3 percent rows only
FOR UPDATE
;
TRAP: FailedAssertion("!(slot != ((void *)0))", File: "execTuples.c",
Line: 428)
Erik Rijkers