On 2018-06-18 14:49, Alex Peshkoff via Firebird-devel wrote:
On 17.06.2018 13:17, Mark Rotteveel wrote:
I don't agree with this ticket getting closed. I raised an objection to the current solution in the comments that I think needs to be addressed.

The current solution causes a divergence in errors between decimals(p,s) with p <=18 and 18 < p <=34, which is confusing and leaks implementation details to the user. In the same situation it should raise the same errors.


Error 'arithmetic exception, numeric overflow, or string truncation'
is too widely used here & there in our codebase. Therefore it was
suggested by Dmitry Emanov to avoid that error when dealing with
decimal float digits, use instead exact native error codes. I do not
remember where and how was it discussed, we often talk privately but
sometimes discuss such thing on forums too.

The current error is specific, it is

arithmetic exception, numeric overflow, or string truncation
numeric value is out of range

In other words, group "arithmetic exception, numeric overflow, or string truncation" (which - or similar - IIRC is also mentioned in the SQL standard), with specific error "numeric value is out of range". This combination is also valid for other numeric datatypes, and I don't see a good reason to deviate here, as it will break common error handling or make it more problematic.

Must say that if we take some decision changing this particular
message I suppose it will be better to review all related errors
related with decimal floats. On my mind if we decide to do it better
do sooner than later - beta release is hopefully coming soon.

I think that would be a good idea.

Mark

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to