Skip to content

Allow different but compatible types in foreign key constraints#1277

Merged
zachmu merged 31 commits intomainfrom
zachmu/foreign-key-types
Mar 13, 2025
Merged

Allow different but compatible types in foreign key constraints#1277
zachmu merged 31 commits intomainfrom
zachmu/foreign-key-types

Conversation

@zachmu
Copy link
Copy Markdown
Member

@zachmu zachmu commented Mar 12, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2025

Main PR
Total 42090 42090
Successful 15710 15710
Failures 26380 26380
Partial Successes1 5194 5194
Main PR
Successful 37.3248% 37.3248%
Failures 62.6752% 62.6752%

${\color{red}Regressions (1)}$

alter_table

QUERY:          ALTER TABLE onek ADD CONSTRAINT onek_unique1_constraint UNIQUE (unique1);
RECEIVED ERROR: `onek_unique1_constraint` already exists as an index for this table (errno 1105) (sqlstate HY000)

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

triggers

QUERY: create table convslot_test_child (col1 text primary key,
	foreign key (col1) references convslot_test_parent(col1) on delete cascade on update cascade
);

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 12, 2025

Main PR
covering_index_scan_postgres 386.17/s 391.12/s +1.2%
index_join_postgres 157.01/s 156.17/s -0.6%
index_join_scan_postgres 188.58/s 187.61/s -0.6%
index_scan_postgres 12.62/s 12.58/s -0.4%
oltp_point_select 2795.97/s 2799.28/s +0.1%
oltp_read_only 1873.66/s 1863.22/s -0.6%
select_random_points 109.98/s 111.66/s +1.5%
select_random_ranges 134.82/s 133.30/s -1.2%
table_scan_postgres 10.42/s 10.33/s -0.9%
types_table_scan_postgres 5.35/s 5.48/s +2.4%

@zachmu
Copy link
Copy Markdown
Member Author

zachmu commented Mar 12, 2025

This seems to introduce a regression for empty constraint names on unique keys. Will fix that and add tests.

Copy link
Copy Markdown
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.

Overall LGTM, but a few things that we should address before merging.

@zachmu zachmu enabled auto-merge March 13, 2025 00:54
@zachmu zachmu merged commit c735587 into main Mar 13, 2025
14 checks passed
@zachmu zachmu deleted the zachmu/foreign-key-types branch March 13, 2025 01:08
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