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

Fix IDENTITY_INSERT to work cross-db (#3402) #3424

Conversation

thephantomthief
Copy link
Contributor

Previously, passing three part object names to SET IDENTITY_INSERT was throwing an error. In this commit, if the relation name is a three part name, we will parse the catalog name and set the IDENTITY_INSERT property for the relation in that catalog.

Also with this commit, we will check if current user has permission to SET IDENTITY_INSERT for the relation.

Task: BABEL-3212
Signed-off-by: Sharu Goel [email protected]

Check List

  • Commits are signed per the DCO using --signoff

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.

thephantomthief and others added 2 commits January 22, 2025 14:19
Previously, passing three part object names to SET IDENTITY_INSERT was
throwing an error. In this commit, if the relation name is a three part
name, we will parse the catalog name and set the IDENTITY_INSERT
property for the relation in that catalog.

Also with this commit, we will check if current user has permission to SET
IDENTITY_INSERT for the relation.

Task: BABEL-3212

Signed-off-by: Sharu Goel <[email protected]>
Copy link
Contributor

@shalinilohia50 shalinilohia50 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 12911221081

Details

  • 34 of 42 (80.95%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 74.931%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/pl_handler.c 34 42 80.95%
Totals Coverage Status
Change from base Build 12825415772: 0.003%
Covered Lines: 46983
Relevant Lines: 62702

💛 - Coveralls

@shardgupta shardgupta merged commit 31c6889 into babelfish-for-postgresql:BABEL_4_X_DEV Jan 22, 2025
47 checks passed
@shardgupta shardgupta deleted the sharu-dev-3212-4x branch January 22, 2025 16:12
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.

4 participants