Re: FETCH FIRST clause PERCENT option

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: FETCH FIRST clause PERCENT option
Дата
Msg-id 4855d0904a110970e88a662df3c768f4@xs4all.nl
обсуждение исходный текст
Ответ на Re: FETCH FIRST clause PERCENT option  (Surafel Temesgen <surafel3000@gmail.com>)
Ответы Re: FETCH FIRST clause PERCENT option
Список pgsql-hackers
On 2018-08-28 14:14, Surafel Temesgen wrote:
> On Tue, Aug 21, 2018 at 3:50 PM Andres Freund <andres@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




















В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Something's busted in plpgsql composite-variable handling
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: logical decoding: ABI break in 10.5 et al