Re: Remove restrictions in recursive query - Mailing list pgsql-hackers

From Renan Alves Fonseca
Subject Re: Remove restrictions in recursive query
Date
Msg-id CAN_p2QhfY8U8=J518tqtoVcP+cP4As=oSVoB=eh7ss783Ga+UQ@mail.gmail.com
Whole thread Raw
In response to Re: Remove restrictions in recursive query  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Remove restrictions in recursive query
Re: Remove restrictions in recursive query
List pgsql-hackers
On Thu, Mar 27, 2025 at 7:10 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:
>
> There is distinct behavior between group by and order by here.  You seem to be mixing them up.
>
> From Select:
>
> select_statement is any SELECT statement without an ORDER BY, LIMIT, FOR NO KEY UPDATE, FOR UPDATE, FOR SHARE, or FOR
KEYSHARE clause. (ORDER BY and LIMIT can be attached to a subexpression if it is enclosed in parentheses. Without
parentheses,these clauses will be taken to apply to the result of the UNION, not to its right-hand input expression.) 
>
> This is the exact same parsing precedence order by is being given in the recursive CTE query situation presented
earlier.
>
> David J.
>

You're right. I'm really mixing these 2 here. Thanks for the clarification.

I'll assume that the silence about allowing GROUP BY means it is not a
great idea...



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Remove restrictions in recursive query
Next
From: Robert Haas
Date:
Subject: Re: Proposal: Progressive explain