Re: Common Table Expressions (WITH RECURSIVE) patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Common Table Expressions (WITH RECURSIVE) patch
Дата
Msg-id 14004.1222922685@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Common Table Expressions (WITH RECURSIVE) patch  ("Hitoshi Harada" <umi.tanuki@gmail.com>)
Ответы Re: Common Table Expressions (WITH RECURSIVE) patch  (Greg Stark <greg.stark@enterprisedb.com>)
Список pgsql-hackers
"Hitoshi Harada" <umi.tanuki@gmail.com> writes:
> 2008/10/2 Tom Lane <tgl@sss.pgh.pa.us>:
>> Okay, there's a patch in CVS HEAD that works this way.  Let me know if
>> it needs further tweaking for your purposes.

> Hmm, I've looked over the patch. Logically window functions can access
> arbitrary rows that have been stored in a frame. Thus I had thought
> tuplestore should hold all the positions and allow arbitrary random
> access indicated by integer. Maybe those functionalities can be
> abstracted by the window function API itself. For this matter it seems
> that you'd better to look at my future patch.

Well, the problem with defining it as "arbitrary" random access is that
there's no way for the tuplestore to throw away old data.

The scheme that I have in mind here is that you keep (at least) two read
pointers, one that is where you're actually reading the data and one
that is nailing down the oldest point you might need to return to.
This is a generalization of the previous mark/restore logic to allow any
number of pairs of mark and restore points.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Fwd: Has anyone built pgbash-7.3 against postgreSQL-8.3?
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Block-level CRC checks