Skip to content

Conversation

fulghum
Copy link
Contributor

@fulghum fulghum commented Aug 5, 2025

Adds support for the RETURNING clause in DELETE statements.

Example:

DELETE FROM myTable WHERE startDate IS NULL RETURNING id;

Depends on dolthub/go-mysql-server#3142

Copy link
Contributor

github-actions bot commented Aug 5, 2025

Main PR
covering_index_scan_postgres 324.86/s 316.16/s -2.7%
index_join_postgres 152.56/s 151.93/s -0.5%
index_join_scan_postgres 184.93/s 183.54/s -0.8%
index_scan_postgres 12.18/s 12.22/s +0.3%
oltp_point_select 2431.44/s 2361.06/s -2.9%
oltp_read_only 1752.54/s 1720.43/s -1.9%
select_random_points 114.06/s 114.60/s +0.4%
select_random_ranges 122.28/s 121.05/s -1.1%
table_scan_postgres 11.43/s 11.49/s +0.5%
types_table_scan_postgres 5.34/s 5.38/s +0.7%

Copy link
Contributor

github-actions bot commented Aug 6, 2025

Main PR
Total 42090 42090
Successful 16722 16723
Failures 25368 25367
Partial Successes1 5545 5545
Main PR
Successful 39.7292% 39.7315%
Failures 60.2708% 60.2685%

${\color{lightgreen}Progressions (1)}$

foreign_key

QUERY: DELETE FROM pk WHERE a = 20 RETURNING *;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

@fulghum fulghum requested a review from Hydrocharged August 6, 2025 19:30
Copy link
Collaborator

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fulghum fulghum force-pushed the fulghum/delete_returning branch from cf305fb to 232bfdf Compare August 8, 2025 18:53
@fulghum fulghum merged commit a4a8be4 into main Aug 8, 2025
14 checks passed
@fulghum fulghum deleted the fulghum/delete_returning branch August 8, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants