Hello.

H2 never had real support of Oracle-style TRUNC function. H2 has only own 
function and its optional second argument is a number of digits.
Recent releases of H2 are more pedantic and they correctly reject the 
second argument when it isn't supported due to type of the first argument, 
I forget about this difference.

Old versions ignore this unexpected argument and may silently return an 
incorrect result. It's better to have an explicit error.

This function with datetime argument will be deprecated in the next version 
H2 due to its weird behavior and low usability, H2 has another function for 
that purpose with sane implementation.

Own functions are intentionally resolved first, but the whole Function 
class and its name resolution logic are going to be removed from H2. Many 
functions were already moved out into own classes.

H2 can have a specialized implementation of TRUNC function for Oracle mode 
or some conditional code in the current implementation for that mode, but I 
think we need to complete the separation of the Function class first.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/f3f0a332-2a26-4ed3-91c4-305bfc96c8eao%40googlegroups.com.

Reply via email to