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

SET Volatility of helper functions used to convert string to date and time types to IMMUTABLE #2659

Closed rohit01010 closed 2 weeks ago

rohit01010 commented 3 weeks ago

Description

Currently, helper functions used by convert function for converting string to date and time related types, are marked STABLE, due to this creation of indexes and computed columns on this functions throws error as follows.

functions in index predicate must be marked IMMUTABLE 

This PR fixes this issue by updating volatility of all these helper functions used by convert function to convert from string to date and time related types, to IMMUTABLE. These functions are marked IMMUTABLE as they qualify the criteria to be a IMMUTABLE function.

Authored-by: Rohit Bhagat rohitbgt@amazon.com Signed-off-by: Rohit Bhagat rohitbgt@amazon.com

Issues Resolved

BABEL-5031

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 weeks ago

Pull Request Test Coverage Report for Build 9477062128

Details


Totals Coverage Status
Change from base Build 9451353483: 0.0%
Covered Lines: 42085
Relevant Lines: 57371

💛 - Coveralls