Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foreign key constraint handling #1011

Merged
merged 2 commits into from
Nov 11, 2023
Merged

Foreign key constraint handling #1011

merged 2 commits into from
Nov 11, 2023

Conversation

mihaibudiu
Copy link
Collaborator

Is this a user-visible change (yes/no): yes

Fixes #1007

It turns out that some SQL dialects allow each column to participate in multiple FOREIGN KEY constraints. So checking that each column is in a single FOREIGN KEY constraint is not legal.
Currently we only do superficial validation for KEY constraints and no validation for FOREIGN KEY constraints. We also don't use the KEY constraints in the compilation process at all.
But with this change we should hopefully admit all legal SQL DDL forms of specifying these constraints.

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@mihaibudiu mihaibudiu changed the title Foreign Foreign key constraint handling Nov 10, 2023
@mihaibudiu mihaibudiu merged commit 95288ea into main Nov 11, 2023
5 checks passed
@mihaibudiu mihaibudiu deleted the foreign branch November 11, 2023 00:42
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.

Support multiple constraints on same table column
2 participants