DECODE function can accept up to 65535 components on Oracle 12c.
* 65535 components
-----
SELECT DECODE(1, 2,3 ... 65535) FROM DUAL;
-----
-> work
" 65536 components
-----
SELECT DECODE(1, 2,3 ... 65536) FROM DUAL;
-----
-> ORA-0939: too many arguments for function
Although the function accepts up to 65535 components(2^16 - 1), the document says that the maximum number of component is 255.
https://docs.oracle.com/database/121/SQLRF/functions057.htm#SQLRF00631
-----
The maximum number of components in the DECODE function, including expr, searches, results, and default, is 255.
-----
Why can the function accept huge number of components?
Does anyone know the reason?
I could not find any information or release note about this discrepancy.