From:
"Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
To:
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc:
"Greg Stark" <stark(at)enterprisedb(dot)com>, "Dimitri Fontaine" <dfontaine(at)hi-media(dot)com>, "Jeff Davis" <pgsql(at)j-davis(dot)com>, "Tatsuo Ishii" <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject:
Re: Common Table Expressions (WITH RECURSIVE) patch
Date:
2008-10-02 01:16:47
Message-ID:
e08cc0400810011816y17a35d9dsbcea5f7d4cfb8791@mail.gmail.com (view raw or flat )
Thread:
2008-09-08 15:12:23 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-08 17:08:55 from Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
2008-09-08 20:11:27 from Jeff Davis <jdavis(at)truviso(dot)com>
2008-09-08 21:53:20 from Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
2008-09-08 22:13:41 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-08 20:13:34 from Gregory Stark <stark(at)enterprisedb(dot)com>
2008-09-08 20:25:18 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 04:45:55 from Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
2008-09-09 05:01:12 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 06:23:05 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 13:47:46 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 15:21:33 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-10 18:27:57 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 14:40:14 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 14:45:55 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 14:59:48 from Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
2008-09-09 16:06:53 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 16:27:17 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-09 16:51:55 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 17:25:29 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-09 17:32:31 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-09 20:07:22 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-09 15:01:10 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 04:49:00 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-09 15:12:58 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-15 09:46:16 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-16 05:41:14 from David Fetter <david(at)fetter(dot)org>
2008-09-16 16:41:19 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-16 19:43:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-16 22:23:38 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-09-16 22:40:00 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-16 18:32:23 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 03:14:31 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-17 04:48:29 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 10:29:04 from "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
2008-09-17 12:12:09 from "Robert Haas" <robertmhaas(at)gmail(dot)com>
2008-09-17 12:25:44 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 14:13:33 from "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
2008-09-17 14:47:01 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-17 14:59:13 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-17 15:05:13 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-18 03:55:25 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-23 12:55:41 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-23 13:16:02 from Gregory Stark <stark(at)enterprisedb(dot)com>
2008-09-23 13:40:39 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 01:45:24 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 06:36:56 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-09-30 18:03:14 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-30 19:39:10 from Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
2008-10-01 00:59:37 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-01 13:54:36 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 14:03:37 from "Greg Stark" <stark(at)enterprisedb(dot)com>
2008-10-01 14:11:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 16:05:57 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-01 19:53:11 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-02 01:16:47 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-02 04:44:45 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-02 09:02:35 from Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>
2008-10-02 12:13:44 from "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
2008-10-03 19:55:56 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-04 15:33:21 from David Fetter <david(at)fetter(dot)org>
2008-10-05 15:41:21 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-10-01 03:10:51 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-24 05:24:33 from Jeff Davis <pgsql(at)j-davis(dot)com>
2008-09-19 01:32:51 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-19 02:52:31 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
2008-09-21 02:42:42 from Tatsuo Ishii <ishii(at)postgresql(dot)org>
2008-09-21 02:52:09 from Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Lists:
pgsql-hackers
2008/10/2 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com> writes:
>>> I hadn't realized that this would be relevant to window functions.
>>> Now that I know that, I propose fixing tuplestore for multiple
>>> positions and committing it separately, before I go back to the CTE
>>> patch. Then Hitoshi-san will have something he can work with too.
>
>> Yes, tuplestore multiple positioning will give the greate help to the
>> window function. Ideally, it is better that tuplestore'd have all the
>> positions and have some kind of capability to discard old rows so that
>> it can stay in TSS_MEM, which helps window function's sliding frame.
>
> Okay, there's a patch in CVS HEAD that works this way. Let me know if
> it needs further tweaking for your purposes.
>
> regards, tom lane
>
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.
Everything else is great deal. By improving tuplestore_trim(), sliding
frame will be performed better than I'd thought.
Regards,
--
Hitoshi Harada
In response to
Responses
pgsql-hackers by date
Next :From: Gurjeet SinghDate: 2008-10-02 01:22:56
Subject : Re: Fwd: Has anyone built pgbash-7.3 against postgreSQL-8.3?
Previous :From : Alvaro HerreraDate : 2008-10-02 00:34:42
Subject : Re: Transactions within a function body