Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3752
This PR lets the caller submit record IDs to be deleted in any type, and then coerces them to text (along with the actual primary key column) before comparing in the
DELETE
'sWHERE
clause.Technical details
A side-effect of this PR is that we can no longer support some more exotic primary key column types (e.g., composite types, array types), whereas the previous version would have.
We consider this to be a reasonable compromise at the moment, since we don't really officially support tables with non-integer primary keys anyway. However, because the new behavior is a bit inconsistent (and may be confusing), we should readdress this at some point, and try to come up with a better solution.
Note that we do not coerce the submitted keys to the type of the primary key column, since that conversion could be lossy, and result in deleting more records than intended.
When submitting primary keys to which we apply custom formatting (e.g., datetime types), they should be formatted when submitted.
Checklist
Update index.md
).develop
branch of the repositoryvisible errors.
Developer Certificate of Origin
Developer Certificate of Origin