Skip to content

Avoid name collisions for generated FK names#1285

Merged
fulghum merged 1 commit intomainfrom
fulghum/fk_name
Mar 14, 2025
Merged

Avoid name collisions for generated FK names#1285
fulghum merged 1 commit intomainfrom
fulghum/fk_name

Conversation

@fulghum
Copy link
Copy Markdown
Contributor

@fulghum fulghum commented Mar 13, 2025

Matches Postgres' behavior where default foreign key name collisions are resolved by adding an integer suffix to the name to make it unique.

Also includes a bug fix for setting the target schema when dropping a primary key.

Fixes a couple more issues with supporting DoltHub's schema in Doltgres.

@fulghum fulghum requested a review from zachmu March 13, 2025 22:11
@github-actions
Copy link
Copy Markdown
Contributor

Main PR
covering_index_scan_postgres 401.03/s 397.23/s -1.0%
index_join_postgres 155.14/s 154.71/s -0.3%
index_join_scan_postgres 188.16/s 186.88/s -0.7%
index_scan_postgres 12.36/s 12.60/s +1.9%
oltp_point_select 2830.00/s 2804.08/s -1.0%
oltp_read_only 1887.05/s 1880.27/s -0.4%
select_random_points 112.15/s 112.12/s -0.1%
select_random_ranges 135.32/s 135.19/s -0.1%
table_scan_postgres 10.33/s 10.37/s +0.3%
types_table_scan_postgres 5.43/s 5.42/s -0.2%

@github-actions
Copy link
Copy Markdown
Contributor

Main PR
Total 42090 42090
Successful 15710 15713
Failures 26380 26377
Partial Successes1 5194 5194
Main PR
Successful 37.3248% 37.3319%
Failures 62.6752% 62.6681%

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

alter_table

QUERY: alter table atacc1 alter column test drop not null;
QUERY: insert into atacc1 values (null);

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.

Copy link
Copy Markdown
Member

@zachmu zachmu 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 merged commit 6b0f912 into main Mar 14, 2025
18 checks passed
@fulghum fulghum deleted the fulghum/fk_name branch March 14, 2025 00:16
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