Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-20 Thread Tatsuo Ishii
> On Mon, Jul 21, 2008 at 08:19:35AM +0900, Tatsuo Ishii wrote: > > > > Thus I think we should avoid this kind of ORDER BY. Probably we should > > > > avoid LIMIT/OFFSET and FOR UPDATE as well. > > > > > > What of index-optimized SELECT max(...) ? > > > > Aggregate functions in a recursive term i

Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-20 Thread David Fetter
On Mon, Jul 21, 2008 at 08:19:35AM +0900, Tatsuo Ishii wrote: > > > Thus I think we should avoid this kind of ORDER BY. Probably we should > > > avoid LIMIT/OFFSET and FOR UPDATE as well. > > > > What of index-optimized SELECT max(...) ? > > Aggregate functions in a recursive term is prohibited b

Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-20 Thread Tatsuo Ishii
> > Thus I think we should avoid this kind of ORDER BY. Probably we should > > avoid LIMIT/OFFSET and FOR UPDATE as well. > > What of index-optimized SELECT max(...) ? Aggregate functions in a recursive term is prohibited by the standard. For example, WITH RECURSIVE x(n) AS (SELECT 1 UNION ALL

Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-20 Thread Tom Lane
Tatsuo Ishii <[EMAIL PROTECTED]> writes: > Thus I think we should avoid this kind of ORDER BY. Probably we should > avoid LIMIT/OFFSET and FOR UPDATE as well. What of index-optimized SELECT max(...) ? regards, tom lane -- Sent via pgsql-patches mailing list (pgsql-patche

Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-20 Thread Tatsuo Ishii
> This crashes the backend: > > WITH RECURSIVE t(n) AS ( > VALUES (1) > UNION ALL > SELECT n+1 FROM t WHERE n < 5 ORDER BY 1 > ) > SELECT n FROM t; > > apparently because of the ORDER BY 1 Thanks for the report. I think ORDER BY in this case is useless anyway. ORDER BY affects (VALUES

Re: [HACKERS] [PATCHES] WITH RECUSIVE patches 0717

2008-07-18 Thread Erik
On Fri, July 18, 2008 03:41, Tatsuo Ishii wrote: >> > Here is the lastest WITH RECURSIVE patches against CVS HEAD created by >> > Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. >> >> I tried this patch vs. CVS HEAD used my usual configure option with >> only --with-prefix set, then tried to

Re: [PATCHES] WITH RECUSIVE patches 0717

2008-07-18 Thread David Fetter
On Fri, Jul 18, 2008 at 07:56:09AM -0700, David Fetter wrote: > On Fri, Jul 18, 2008 at 10:41:20AM +0900, Tatsuo Ishii wrote: > > > > Here is the lastest WITH RECURSIVE patches against CVS HEAD created by > > > > Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. > > > > > > I tried this patch

Re: [PATCHES] WITH RECUSIVE patches 0717

2008-07-18 Thread David Fetter
On Fri, Jul 18, 2008 at 10:41:20AM +0900, Tatsuo Ishii wrote: > > > Here is the lastest WITH RECURSIVE patches against CVS HEAD created by > > > Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. > > > > I tried this patch vs. CVS HEAD used my usual configure option with > > only --with-prefix

Re: [PATCHES] WITH RECUSIVE patches 0717

2008-07-17 Thread Tatsuo Ishii
> > Here is the lastest WITH RECURSIVE patches against CVS HEAD created by > > Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. > > I tried this patch vs. CVS HEAD used my usual configure option with > only --with-prefix set, then tried to make, and got: > > make[3]: *** No rule to make tar

Re: [PATCHES] WITH RECUSIVE patches 0717

2008-07-17 Thread David Fetter
On Thu, Jul 17, 2008 at 06:40:25PM +0900, Tatsuo Ishii wrote: > Hi, > > Here is the lastest WITH RECURSIVE patches against CVS HEAD created by > Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. I tried this patch vs. CVS HEAD used my usual configure option with only --with-prefix set, then

[PATCHES] WITH RECUSIVE patches 0717

2008-07-17 Thread Tatsuo Ishii
Hi, Here is the lastest WITH RECURSIVE patches against CVS HEAD created by Yoshiyuki Asaba and minor corrections by Tatsuo Ishii. (David Fetter's psql help patches are not included. It seems his git repository has gone). This version implements: - detect certain queries those are not valid acrod