New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAST(<expression> AS <type name> NOT NULL) [CORE6428] #2364
Comments
Commented by: @mrotteveel Such a syntax is not defined in the SQL standard. Furthermore, the General Rules in 6.13 <cast specification> explicitly state: In other words, the result of a cast of null should always be null. |
Commented by: @livius2 It will be usefull extension instead of your i use i generate division by 0 here. |
Commented by: @ibprovider Karol, UP! :) |
Commented by: @mrotteveel Having a separate function or expression that raises an error when the value is null, or returns the value seems more sensible to me to be honest than to force this into cast. |
Commented by: @livius2 Of course Mark. |
Commented by: @mrotteveel I was arguing that if such a feature were to be added it should be as a separate built-in function (or an expression), not as part of cast. |
Submitted by: @ibprovider
Hello,
At current time Firebird does not allow expression like "CAST(ColumnName AS INTEGER NOT NULL)".
The expected behavior is generation of error for a NULL value.
This feature may be used in LINQ-translators for "Nullable<type>.Value" expressions.
The text was updated successfully, but these errors were encountered: