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 TTT2 values(-32768);

 

SQL> select -COL_SMALLINT from TTT2;

 

=======

Statement failed, SQLSTATE = 22003

Integer overflow.  The result of an integer operation caused the most
significant bit of the result to carry.

 

It is OK?

 

Dmitry Kovalenko.

Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to