I'm attempting to do a multi-table delete against PostgreSQL (psycopg2) with
the following query:
filter(Project.id == ProductionItem.project_id,
But it produces incorrect SQL. PostgreSQL requires the following syntax for
DELETE FROM production_items USING projects WHERE
production_items.project_id = project.id AND project.code IN (...) AND
production_items.external_id IS NONE
Instead, I get this:
DELETE FROM production_items WHERE production_items.project_id = project.id
AND project.code IN (...) AND production_items.external_id IS NONE
At which point PG complains:
sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) missing
FROM-clause entry for table "projects"
>From initial research this seems like a missing feature. Would it be
possible to add this to the postgresql dialect somehow? I might be willing
to contribute the code in that case.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.