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
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.