From:
"Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com>
To:
"Greg Stark" <greg(dot)stark(at)enterprisedb(dot)com>
Cc:
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "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 12:13:44
Message-ID:
e08cc0400810020513s735936b3kfd74e73f1675b3fb@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 Greg Stark <greg(dot)stark(at)enterprisedb(dot)com>:
>
>
> On 2 Oct 2008, at 05:44 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> "Hitoshi Harada" <umi(dot)tanuki(at)gmail(dot)com> writes:
>>
>>> 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.
>
> And that there's no way to make it work if the tuplestore has spilled to
> disk.
>
In my purpose the "old data" can always be indicated by an integer row
position. So the real problem here is how you store all the row
positions for arbitrary random access closer to O(1). Yes, you can go
to certain row by fetching tuples manytimes from a marked row but it's
inefficient. I know my patch sent before is also inefficent. But
essentially the window function needs high cost.
I'll try to process my work with the patch but maybe more work on
tuplestore will be needed after we see the real problem that I don't
see now either.
Regards,
--
Hitoshi Harada
In response to
pgsql-hackers by date
Next :From: Tom LaneDate: 2008-10-02 12:27:47
Subject : Re: Re: [COMMITTERS] pgsql: Allow pg_regress to be run outside the build tree.
Previous :From : Peter EisentrautDate : 2008-10-02 11:51:08
Subject : Re: [COMMITTERS] pgsql: Allow pg_regress to be run outside the build
tree.