Re: [HACKERS] WITH RECUSIVE patches 0717 - Mailing list pgsql-patches

From Tatsuo Ishii
Subject Re: [HACKERS] WITH RECUSIVE patches 0717
Date
Msg-id 20080721.081935.116359430.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: [HACKERS] WITH RECUSIVE patches 0717  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] WITH RECUSIVE patches 0717
List pgsql-patches
> > 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 SELECT max(n) FROM x)
  SELECT * FROM x;

produces an error.
--
Tatsuo Ishii
SRA OSS, Inc. Japan

pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: pg_dump additional options for performance
Next
From: David Fetter
Date:
Subject: Re: [HACKERS] WITH RECUSIVE patches 0717