order/limit nested inside union/intersect #4544
Replies: 1 comment 3 replies
-
I'd like to not unnecessarily restrict this as the major databases support this just fine and for those that don't, window functions are used to emulate this. Allowing this only at the root level is exactly what we had in 5.x, but people, me included, want to do stuff like |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently our BNF is:
This is more complex than I would have expected because it allows
order by
andlimit
/offset
inside the tree of setunion
andintersect
operations.But I'm not convinced we should allow this. Naively, it doesn't make sense to do set operations on arbitrary bits of sets, or on ordered sets, and I don't know how many databases even support it. (Not sure.)
The only think I can think of is: perhaps this makes sense for reporting queries, but even in that case I'm struggling to see the value.
Do ya'll think we should simplify this, and only allow
order by
andlimit
/offset
at the root level?Beta Was this translation helpful? Give feedback.
All reactions