On 4-8-2013 01:44, Adriano dos Santos Fernandes wrote:
> On 03-08-2013 03:55, Mark Rotteveel wrote:
>> I just saw this question on Stackoverflow
>> http://stackoverflow.com/questions/18026907/firebird-insert-hex-values-into-tables-arithmetic-exception
>>
>> And I wondered if it isn't a bug that hex values with 1-4 digits are
>> integer and not smallint. Or at least: shouldn't the engine have enough
>> context information to correctly convert 0x8000 to a smallint -32768
>> instead of an integer 32768?
>>
>
> It's documented, so it's not a bug.

Ok, lets not call it a bug, but an area of potential improvement: based 
on the context it should be possible to deduce that the literal should 
be a smallint. Therefor it should be possible to handle 0x8000 as -32768 
when assigned to a smallint and as 32768 for an integer.

Mark
-- 
Mark Rotteveel

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to