Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-28 Thread Josh Berkus
Tom, I think this patch is plenty complicated enough without adding useless restrictive options. +1 for no additonal GUC options. --Josh Berkus -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

Re: Updated patch (Re: [PATCHES] WITH RECURSIVE patch V0.1)

2008-05-25 Thread David Fetter
On Sat, May 24, 2008 at 05:08:51AM -0700, David Fetter wrote: > On Sun, May 18, 2008 at 08:51:29PM +0900, Tatsuo Ishii wrote: > > WITH RECURSIVE patch V0.1 > > Please find updated patch with bug fixes from Yoshiyuki Asaba and > Michael Meskes. Any mistakes in it are mine. :) As promised, the mis

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-25 Thread Tom Lane
[ catching up on back email ] Gregory Stark <[EMAIL PROTECTED]> writes: > "Yoshiyuki Asaba" <[EMAIL PROTECTED]> writes: >> Recursive query does not consume stack. The server enters an infinite >> loop without consuming stack. Stack-depth error does not happen. > We could have a separate guc varia

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-25 Thread Joshua D. Drake
Hans-Juergen Schoenig wrote: Gregory Stark wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: i don't think statement_timeout is a good idea at all. it is not deterministic. depending on the load on the server some queries will execute while others fail. a separate GUC is needed. I

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-25 Thread Hans-Juergen Schoenig
Gregory Stark wrote: "Joshua D. Drake" <[EMAIL PROTECTED]> writes: Couldn't we just have it pay attention to the existing max_stack_depth? Recursive query does not consume stack. The server enters an infinite loop without consuming stack. Stack-depth error does not happen.

Updated patch (Re: [PATCHES] WITH RECURSIVE patch V0.1)

2008-05-24 Thread David Fetter
On Sun, May 18, 2008 at 08:51:29PM +0900, Tatsuo Ishii wrote: > WITH RECURSIVE patch V0.1 Please find updated patch with bug fixes from Yoshiyuki Asaba and Michael Meskes. Any mistakes in it are mine. :) Cheers, David. -- David Fetter <[EMAIL PROTECTED]> http://fetter.org/ Phone: +1 415 235 377

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-24 Thread Yoshiyuki Asaba
Hi, From: Zoltan Boszormenyi <[EMAIL PROTECTED]> Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 Date: Sun, 18 May 2008 23:22:02 +0200 > But I have a little problem with the output. > If it's not obvious, here is the query tweaked a little below. ... > Can we get the rows i

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-23 Thread David Fetter
On Sat, May 24, 2008 at 05:01:11AM +0900, Yoshiyuki Asaba wrote: > Hi, > > From: David Fetter <[EMAIL PROTECTED]> > Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 > Date: Fri, 23 May 2008 11:26:30 -0700 > > > Where is the new patch? > > I will create t

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-23 Thread Yoshiyuki Asaba
Hi, From: David Fetter <[EMAIL PROTECTED]> Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 Date: Fri, 23 May 2008 11:26:30 -0700 > Where is the new patch? I will create the revised patch on June. This is a patch for this problem. *** ../../pgsql/src/backend/executor/nodeRecurs

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-23 Thread David Fetter
On Sat, May 24, 2008 at 03:21:01AM +0900, Yoshiyuki Asaba wrote: > Hi, > > From: David Fetter <[EMAIL PROTECTED]> > Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 > Date: Sun, 18 May 2008 11:47:37 -0700 > > > I tried a bunch of different queries, and so far, onl

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-23 Thread Yoshiyuki Asaba
Hi, From: David Fetter <[EMAIL PROTECTED]> Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 Date: Sun, 18 May 2008 11:47:37 -0700 > I tried a bunch of different queries, and so far, only these two > haven't worked. Any ideas what I'm doing wrong here? > > WITH RECU

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Gregory Stark
"Joshua D. Drake" <[EMAIL PROTECTED]> writes: >> >> Couldn't we just have it pay attention to the existing >> >> max_stack_depth? >> > >> > Recursive query does not consume stack. The server enters an infinite >> > loop without consuming stack. Stack-depth error does not happen. >> >> We could ha

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Joshua D. Drake
> >> Couldn't we just have it pay attention to the existing > >> max_stack_depth? > > > > Recursive query does not consume stack. The server enters an infinite > > loop without consuming stack. Stack-depth error does not happen. > > We could have a separate guc variable which limits the maximum n

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Gregory Stark
"Yoshiyuki Asaba" <[EMAIL PROTECTED]> writes: > Hi, > > From: David Fetter <[EMAIL PROTECTED]> > Subject: Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1 > Date: Mon, 19 May 2008 04:36:30 -0700 > >> > > I think it's the other way aro

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Yoshiyuki Asaba
Hi, From: David Fetter <[EMAIL PROTECTED]> Subject: Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1 Date: Mon, 19 May 2008 04:36:30 -0700 > > > I think it's the other way around. The server should not emit > > > infinite number of records. > > >

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-21 Thread Tatsuo Ishii
> On Sun, May 18, 2008 at 08:51:29PM +0900, Tatsuo Ishii wrote: > > WITH RECURSIVE patch V0.1 > > > > Here are patches to implement WITH RECURSIVE clause. There are some > > limitiations and TODO items(see the "Current limitations" section > > below). Comments are welcome. > > > > 1. Credit > >

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-20 Thread Kev
On May 19, 1:17 am, [EMAIL PROTECTED] (David Fetter) wrote: > On Mon, May 19, 2008 at 12:21:20AM -0400, Gregory Stark wrote: > > It's quite possible to have clauses which will limit the output but > > not in a way the database can determine. Consider for example a > > tree-traversal for a binary t

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-19 Thread David Fetter
On Mon, May 19, 2008 at 05:57:17PM +0900, Yoshiyuki Asaba wrote: > Hi, > > > I think it's the other way around. The server should not emit > > infinite number of records. > > How about adding new GUC parameter "max_recursive_call"? Couldn't we just have it pay attention to the existing max_stack

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-19 Thread Zoltan Boszormenyi
Yoshiyuki Asaba írta: Hi, From: Zoltan Boszormenyi <[EMAIL PROTECTED]> Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 Date: Mon, 19 May 2008 08:19:17 +0200 Also, it seems there are no infinite recursion detection: # with recursive x(level, parent, child) as ( select 1::i

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-19 Thread Yoshiyuki Asaba
Hi, From: Zoltan Boszormenyi <[EMAIL PROTECTED]> Subject: Re: [PATCHES] WITH RECURSIVE patch V0.1 Date: Mon, 19 May 2008 08:19:17 +0200 > >> Also, it seems there are no infinite recursion detection: > >> > >> # with recursive x(level, parent, child) as (

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-19 Thread Zoltan Boszormenyi
Gregory Stark írta: This is indeed really cool. I'm sorry I haven't gotten to doing what I promised in this area but I'm glad it's happening anyways. "Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: Can we get the rows in tree order, please? ... After all, I didn't specify any ORDER BY cl

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Gregory Stark
This is indeed really cool. I'm sorry I haven't gotten to doing what I promised in this area but I'm glad it's happening anyways. "Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: > Can we get the rows in tree order, please? >... > After all, I didn't specify any ORDER BY clauses in the base, r

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Gregory Stark
"David Fetter" <[EMAIL PROTECTED]> writes: > On Mon, May 19, 2008 at 12:21:20AM -0400, Gregory Stark wrote: >> "Zoltan Boszormenyi" <[EMAIL PROTECTED]> writes: >> > Also, it seems there are no infinite recursion detection: >> > >> > # with recursive x(level, parent, child) as ( >> >select 1::i

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread David Fetter
On Mon, May 19, 2008 at 12:21:20AM -0400, Gregory Stark wrote: > "Zoltan Boszormenyi" <[EMAIL PROTECTED]> 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

Re: [HACKERS] [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Mark Mielke
Merlin Moncure wrote: On Sun, May 18, 2008 at 5:22 PM, Zoltan Boszormenyi <[EMAIL PROTECTED]> wrote: Can we get the rows in tree order, please? I.e. something like this: Is ordering by tree order defined in the standard when no explicit order is given? If not, it probably returns them

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Merlin Moncure
On Sun, May 18, 2008 at 5:22 PM, Zoltan Boszormenyi <[EMAIL PROTECTED]> wrote: > Can we get the rows in tree order, please? I.e. something like this: Is ordering by tree order defined in the standard when no explicit order is given? If not, it probably returns them in the order they are pulled up

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Zoltan Boszormenyi
David Fetter írta: On Sun, May 18, 2008 at 08:51:29PM +0900, Tatsuo Ishii wrote: WITH RECURSIVE patch V0.1 Here are patches to implement WITH RECURSIVE clause. There are some limitiations and TODO items(see the "Current limitations" section below). Comments are welcome. 1. Credit These pat

Re: [PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread David Fetter
On Sun, May 18, 2008 at 08:51:29PM +0900, Tatsuo Ishii wrote: > WITH RECURSIVE patch V0.1 > > Here are patches to implement WITH RECURSIVE clause. There are some > limitiations and TODO items(see the "Current limitations" section > below). Comments are welcome. > > 1. Credit > > These patches we

[PATCHES] WITH RECURSIVE patch V0.1

2008-05-18 Thread Tatsuo Ishii
WITH RECURSIVE patch V0.1 Here are patches to implement WITH RECURSIVE clause. There are some limitiations and TODO items(see the "Current limitations" section below). Comments are welcome. 1. Credit These patches were developed by Yoshiyuki Asaba ([EMAIL PROTECTED]) with some discussions with T