babelfish-for-postgresql / babelfish_extensions

Babelfish for PostgreSQL provides the capability for PostgreSQL to work with applications written for Microsoft SQL Server. Babelfish understands the SQL Server wire-protocol and T-SQL, the Microsoft SQL Server query and procedural language, so you don’t have to switch database drivers or rewrite all of your application queries.
https://babelfishpg.org/
Apache License 2.0
265 stars 87 forks source link

Support CHECK CONSTRAINTS options and Fix Error aborting Cycle in TSQ… #2691

Closed KushaalShroff closed 6 days ago

KushaalShroff commented 6 days ago

This commit has the following changes:

  1. Fix Permissions checking missed in d95b7ad
  2. Fix the error handling behaviour in Bulk Copy. While processing a batch of inserts, if there are unexpected errors then the current design aborts the insert and later tries to cleanup the stale buffers. During cleanup we were not checking for aborted phase and thus flushing buffers even when we didnt have to. With this commit we fix this by not flushing during cleanup in the abort phase.
  3. Also supported CHECK_CONSTRAINTS insert bulk options with this commit. The ideal behaviour is to not check any constraints unless user passes the CHECK_CONSTRAINTS options. We have now implemented the same for Babelfish.

Issues Resolved BABEL-4200, BABEL-4991

Authored-by: Kushaal Shroff kushaal@amazon.com Signed-off-by: Kushaal Shroff kushaal@amazon.com

Check List

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

coveralls commented 6 days ago

Pull Request Test Coverage Report for Build 9695899022

Details


Totals Coverage Status
Change from base Build 9674393793: 0.07%
Covered Lines: 41894
Relevant Lines: 57360

💛 - Coveralls