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
274 stars 93 forks source link

ALTER PROCEDURE throwing unexpected state error #2706

Closed Jakeowen1 closed 3 months ago

Jakeowen1 commented 3 months ago

Description

This change prevents certain alter procedure calls in PSQL dialect from attempting to use the TSQL alter procedure implementation by adding a dialect check. Procedures created in PSQL and altered with security definer would throw the following error ERROR: StartTransactionCommand: unexpected state STARTED

Issues Resolved

Task: BABEL-5074

Test Scenarios Covered

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 3 months ago

Pull Request Test Coverage Report for Build 9765977542

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
contrib/babelfishpg_tsql/src/pl_handler.c 45 47 95.74%
<!-- Total: 45 47 95.74% -->
Totals Coverage Status
Change from base Build 9741962184: 0.0%
Covered Lines: 42167
Relevant Lines: 57433

💛 - Coveralls