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.
Currently, sys.database_principals T-SQL view shows all the T-SQL users irrespective of the current user. The expectation is that current user should only be able to see the system users and users it has permission of.
This commit fixes the sys.database_principals view to align with the expected T-SQL behaviour.
[x] 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.
Description
Currently, sys.database_principals T-SQL view shows all the T-SQL users irrespective of the current user. The expectation is that current user should only be able to see the system users and users it has permission of.
This commit fixes the sys.database_principals view to align with the expected T-SQL behaviour.
Task: BABEL-4935 Signed-off-by: Sharu Goel goelshar@amazon.com
Test Scenarios Covered
Use case based - Yes
Boundary conditions - N/A
Arbitrary inputs - N/A
Negative test cases - N/A
Minor version upgrade tests - Already present
Major version upgrade tests - Already present
Performance tests - N/A
Tooling impact - N/A
Client tests - N/A
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.