You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] I want to know why the delete using syntax does not support subqueries #2314
In the PG syntax documentation, delete using can use subqueries. The syntax is as follows:
[ WITH [ RECURSIVE ] with_query [, ...] ]
DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ]
[ USING from_item [, ...] ]
[ WHERE condition | WHERE CURRENT OF cursor_name ]
[ RETURNING { * | output_expression [ [ AS ] output_name ] } [, ...] ]
DELETE
but I found that using in jsqlparser only supports specific tables. I want to know why it is designed like this.
SQL Example
Simplified Query Example, focusing on the failing feature
DELETEFROM films f
USING (SELECT id FROM producers WHERE active = false) p
WHEREf.producer_id=p.id;
Tips:
If it is missing or because the previous version of pg does not support it, I would like to submit a PR to improve this special effect.
Activity
manticore-projects commentedon Sep 19, 2025
Greetings!
Please go ahead, your PR will be very welcome.
zhangconan commentedon Sep 22, 2025
Thank you for your encouragement, I will try my best.
zhangconan commentedon Sep 28, 2025
This new feature has been merged into the master branch。delete using syntax enhancement