mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 23:49:03 +00:00
## Context Resolves https://github.com/supabase/supabase/issues/51836 Resolves FE-4666 The auto limit logic in the SQL Editor doesn't handle correctly when the query contains a `LIMIT ALL` or `LIMIT NULL` and will append another `LIMIT x` at the end of the query, so this PR fixes that Also added a fix to ensure that auto limit applies for select statements in CTEs ## To test - [ ] Verify that result does not have auto limit applied if running `select 1 limit all` or `select 1 limit null` in SQL Editor - [ ] Verify that there's auto limit for a CTE statement like `WITH numbers AS (SELECT generate_series(1, 2000) AS n) SELECT n FROM numbers;`