Luca Ferrari <fluca1...@gmail.com> writes: > I've two main doubts: > - is fmgr working for non PL functions? Because I cannot see messages > starting when an internal function is invoked;
Built-in functions do not support fmgr_hook; see the order of tests in fmgr_info_cxt_security(). I'd be loath to change that, for both performance and risk-of-circularity reasons. Note that built-in is not the same as internal --- you could potentially make a new internal-language pg_proc entry pointing at some existing built-in function, and then calls using that could get hooked. regards, tom lane