From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | "David Fetter" <david(at)fetter(dot)org> |
Cc: | "Zoltan Boszormenyi" <zb(at)cybertec(dot)at>, "Tatsuo Ishii" <ishii(at)postgresql(dot)org>, "PG Hackers" <pgsql-hackers(at)postgresql(dot)org>, <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: WITH RECURSIVE patch V0.1 |
Date: | 2008-05-19 05:22:54 |
Message-ID: | 87lk26q34h.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
"David Fetter" <david(at)fetter(dot)org> writes:
> On Mon, May 19, 2008 at 12:21:20AM -0400, Gregory Stark wrote:
>> "Zoltan Boszormenyi" <zb(at)cybertec(dot)at> writes:
>> > Also, it seems there are no infinite recursion detection:
>> >
>> > # with recursive x(level, parent, child) as (
>> > select 1::integer, * from test_connect_by where parent is null
>> > union all
>> > select x.level + 1, base.* from test_connect_by as base, x where base.child
>> > = x.child
>> > ) select * from x;
>> > ... it waits and waits and waits ...
>>
>> Well, psql might wait and wait but it's actually receiving rows. A
>> cleverer client should be able to deal with infinite streams of
>> records.
>
> That would be a very good thing for libpq (and its descendants) to
> have :)
I think you can do it in libpq.
In psql you can use \set FETCH_COUNT or somrthing like this (I can't look it
up just now) to use a cursor to do this too.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!
From | Date | Subject | |
---|---|---|---|
Next Message | Zoltan Boszormenyi | 2008-05-19 06:19:17 | Re: WITH RECURSIVE patch V0.1 |
Previous Message | David Fetter | 2008-05-19 05:17:17 | Re: WITH RECURSIVE patch V0.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Zoltan Boszormenyi | 2008-05-19 06:19:17 | Re: WITH RECURSIVE patch V0.1 |
Previous Message | David Fetter | 2008-05-19 05:17:17 | Re: WITH RECURSIVE patch V0.1 |