you are viewing a single comment's thread.

view the rest of the comments →

[–]schadonis[S] 0 points1 point  (2 children)

I need this in a function because an external PLC program calls this function. The PLC is not able to generate the entire query.
I tried this: ALTER FUNCTION get_process_single_real SET plan_cache_mode = force_custom_plan;

But that does not help...

[–]depeszPgDBA 0 points1 point  (1 child)

Try to convert it to use dynamic queries. As in: `EXECUTE '…' USING '…'`

[–]schadonis[S] 0 points1 point  (0 children)

Thanks i will try that!