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, 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.
[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, 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.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 markedIMMUTABLE
as they qualify the criteria to be aIMMUTABLE
function.Authored-by: Rohit Bhagat rohitbgt@amazon.com Signed-off-by: Rohit Bhagat rohitbgt@amazon.com
Issues Resolved
BABEL-5031
Test Scenarios Covered
Use case based -
Boundary conditions -
Arbitrary inputs -
Negative test cases -
Minor version upgrade tests -
Major version upgrade tests -
Performance tests -
Tooling impact -
Client tests -
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.