Le 07/01/2025 à 12:27, Pavel Stehule a écrit :
If you want to understand to these details, you should to look to source code
fn_signature is calculated in compile time - this is when the function is first time executed in session. Until the end of session or function change, the interpreter uses already compiled AST from cache and doesn't try to call the compiler (or more correctly named - parser). So the behavior depends on the state when the function was executed the first time. It can be more complex when a function uses polymorphic parameters, because then there can be cached more instances of one function.
The reason why signature is calculated only at compile time is just performance. Any access to the system catalog has its own cost, and you don't want to execute it again and again when the function is started. It cannot be executed at exception time (when it is usually used), because at this time it is impossible to access the system catalog.
Regards
Pavel
Ah, this clearly explains the strange to me things I noted. Thanks a lot for the explanation.
This closes the issue.
Regards. Philippe.