Chapman Flack <c...@anastigmatix.net> writes: > On 05/25/18 20:07, Andrew Gierth wrote: >> /* >> * GAH. To do parameter type checking properly, we have to install our >> * own global post-parse hook transiently. >> */ >> ... >> PG_TRY(); >> { >> pllua_spi_prev_parse_hook = post_parse_analyze_hook; >> post_parse_analyze_hook = pllua_spi_prepare_checkparam_hook; >> ... >> PG_CATCH(); >> { >> post_parse_analyze_hook = pllua_spi_prev_parse_hook; >> --pllua_spi_prepare_recursion; >> PG_RE_THROW(); >> ...
> Gah, indeed. Thanks for the heads up. I would never have guessed it'd > be that fiddly. Yikes. That seems pretty unsafe :-( Obviously, I missed a bet by not folding check_variable_parameters into the pstate hook mechanism. It's a bit late to do anything about that for v11, but I'd favor trying to improve the situation in v12. regards, tom lane