-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
server: avoid raising mutation check constraint violation in pg procedure #6123
Conversation
-> Raise check constraint error in Haskell code itself. -> Avoid usage of hdb_catalog.check_constraint procedure
a934764
to
840e59a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I understand RQL well enough to be able to judge if this has any odd side-effects. But the Haskell code itself looks okay to me. @0x777, what do you think?
Co-authored-by: Auke Booij <auke@tulcod.com>
23e9c85
to
fb16638
Compare
This PR currently has a merge conflict. Please resolve this and then re-add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs
Deploy preview for hasura-docs ready! Built with commit 86dd527 |
Resolve Conflicts: server/src-lib/Hasura/Backends/Postgres/Execute/RemoteJoin.hs
1bb7871
to
ba37f11
Compare
ba37f11
to
26395f3
Compare
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
@0x777 Please have a final look at the PR. |
Ah, this introduced some Postgres-specific code in |
Description
This is incremental PR towards #5797. It removes dependency on
hdb_catalog.check_violation
pg procedure to raise mutation (insert & update) check constraint violation exception. Instead, the check constraint violation error is thrown in Haskell code itself.Changelog
CHANGELOG.md
is updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-required
label.Affected components
Related Issues
Refer the PR #5797
Solution and Design
SQL is generated such a way that it returns a nullable error message column
check__constraint
which is result of a check constraint evaluation.In Haskell code, the error is raised when
check__error
column is not null.Steps to test and verify
Limitations, known bugs & workarounds
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
GraphQL
Breaking changes