-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hook in select_common_type for CHAR/NCHAR case (#140)
* Fix SELECT DISTINCT NULL result type With distinct, Postgres coerces the type of unknown-typed targets so it may find an equality function. It selects TEXT as the type to coerce to. The problem in T-SQL is if we are unioning the result of SELECT DISTINCT NULL with a different type. Some types, BIT for example, do not have conversion functions between TEXT. Therefore, SELECT CAST(1 as BIT) UNION SELECT DISTINCT NULL fails unexpectantly in Babelfish. This change coerces NULL values to INT4 instead of TEXT when using Babelfish, fixing the result type and the union behavior. Signed-off-by: Walt Boettge <[email protected]> Task: BABEL-3348, BABEL-3392, BABEL-4157, BABEL-1874
- Loading branch information
Showing
6 changed files
with
41 additions
and
23 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
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