Re: Remove restrictions in recursive query
От | Renan Alves Fonseca |
---|---|
Тема | Re: Remove restrictions in recursive query |
Дата | |
Msg-id | CAN_p2QhfY8U8=J518tqtoVcP+cP4As=oSVoB=eh7ss783Ga+UQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Remove restrictions in recursive query ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: Remove restrictions in recursive query
Re: Remove restrictions in recursive query |
Список | 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 по дате отправления: