Execution plan for functions in PostgreSQL
问题 If I change user-defined function (UDF) that is in use in another UDF will the PostgreSQL rebuild execution plan for both of them or only for changed one? 回答1: If a function is unchanged, the execution plans for all its queries should remain cached. So only the execution plans for the function you changed will be recalculated. You can use the SQL statement DISCARD PLANS to discard all cached plans. 来源: https://stackoverflow.com/questions/46659067/execution-plan-for-functions-in-postgresql