On Thu, 2023-06-01 at 08:50 +0000, James Pang (chaolpan) wrote: > we found thousands of cached plan , since JDBC driver only allow max 256 > cached > prepared statements, how backend cache so many sql plans. If we have one > function, > when application call that function will make backend to cache every SQL > statement > plan in that function too? and for table triggers, have similar caching > behavior ?
Yes, as long as the functions are written in PL/pgSQL. It only affects static SQL, that is, nothing that is run with EXECUTE. Yours, Laurenz Albe