Skip to content

Conversation

gwillem
Copy link
Contributor

@gwillem gwillem commented Jul 17, 2025

Fixes #3848

This would create a panic:

DELETE pt
FROM primary_table pt
JOIN (SELECT 1 as id) jt ON pt.id = jt.id;
panic: expected range var

github.com/sqlc-dev/sqlc/internal/engine/dolphin.convertToRangeVarList(0x140000669c0?, 0x140008f0390)

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 17, 2025
@kyleconroy kyleconroy merged commit eb4b0b5 into sqlc-dev:main Aug 2, 2025
8 checks passed
@gwillem gwillem deleted the wdg/fix-delete-join-subquery branch August 3, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete query with join returns panic: expected range var error
2 participants