upgrade-util
upgrade-util copied to clipboard
pg: add returning_id option to parallel_execute
The default behavior is unchanged.
This adds the possibility to parallelize modifying queries that have a RETURNING id clause. For those, return the resulting ids (in a defined order) instead of the affected row count.
To avoid misuse add a warning to the docstring and try to detect queries other than the ones of the intended form. Raise an error if such are found.
For the record: I think this is not necessary. See more comments in the linked PR in upgrades.
