forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement modulo operator for MONEY/SMALLMONEY types
Description ----------- Due to the missing modulo operator for MONEY/SMALLMONEY types, it will choose the other Postgres internal alternatives like int4mod and numeric_mod, which will involve additional implicit CASTing between MONEY/SMALLMONEY types and other types. These CASTings could cause loss of precision and wrong results. What's more, the result of calculation won't be MONEY/SMALLMONEY types any more. Fix --- Implement the modulo function and operator for MONEY/SMALLMONEY types. The reason why we don't need to implement the functions between MONEY/SMALLMONEY types and interger types is that it will choose the MONEY-MONEY/SMALLMONEY-SMALLMONEY functions to calculate. And the result type is expected. Task: BABEL-5480 Signed-off-by: Bo Li <[email protected]>
- Loading branch information
Showing
5 changed files
with
460 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.