Hi, You cannot set the statement_timeout within a function. You have to set it before you call the function. For example, you can try : BEGIN;
SET
LOCAL statement_timeout = 6000;
SELECT
* from public.”testlock”(); COMMIT; The reason why is explained in this post :
https://dba.stackexchange.com/questions/82977/why-set-local-statement-timeout-does-not-work-as-expected-with-postgresql-func Regards, Patrick Fiche Database Engineer, Aqsacom Sas. c. 33 6 82 80 69 96
From: İlyas Derse <ilyasderse@xxxxxxxxx> CREATE OR REPLACE FUNCTION public."testlock"()
select * from public."testlock"(); How can I do ? |