On 11-10-2021 07:43, Kovalenko Dmitry wrote:
The question is whether result of negation should keep the type of
source or can it be expanded if needed.
Then it would need to expand for all types.
And what would be an -INT128?
Result type must be same as result of expression
>>> The question is whether result of negation should keep the type of
>>> source or can it be expanded if needed.
>>Then it would need to expand for all types.
>And what would be an -INT128?
Result type must be same as result of expression "0-source"?
Note that in Dialect 1:
0-smallint ->
On 10/10/2021 13:11, Dimitry Sibiryakov wrote:
> Mark Rotteveel wrote 10.10.2021 18:08:
>> Yes, this is normal. The range of a smallint is from -32768 to 32767,
>> so you can't negate -32768 as it will overflow back to -32768, hence
>> it will raise the integer overflow error.
>
> The question
Mark Rotteveel wrote 10.10.2021 18:08:
Yes, this is normal. The range of a smallint is from -32768 to 32767, so you
can't negate -32768 as it will overflow back to -32768, hence it will raise the
integer overflow error.
The question is whether result of negation should keep the type of
On 09-10-2021 21:26, Kovalenko Dmitry wrote:
Hello,
FB3.0.8.22506 (Dialect 3)
Firebird defines a follow result types for Negate operation:
-SMALLINT_COLUMN has result type SMALLINT
-INTEGER_COLUMN has result type INTEGER
As result, I see a work like this:
SQL> create table TTT2
Hello,
FB3.0.8.22506 (Dialect 3)
Firebird defines a follow result types for Negate operation:
-SMALLINT_COLUMN has result type SMALLINT
-INTEGER_COLUMN has result type INTEGER
As result, I see a work like this:
SQL> create table TTT2 (COL_SMALLINT SMALLINT);
SQL> insert into