set local statement_timeout within a stored procedure

From: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Cc: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Subject: set local statement_timeout within a stored procedure
Date: 2024-03-19 12:59:38
Message-ID: SA1PR02MB969875FB9A648A34E70460998E2C2@SA1PR02MB9698.namprd02.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

Is there a way to integrate " set local statement_timeout" in a stored procedure?

Something like ....

create or replace procedure call_sp()
language plpgsql
as $$
begin
set local statement_timeout = 10000;
call sp();
end; $$

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Johnathan Tiamoh 2024-03-19 13:22:24 Postgres database encryption
Previous Message Bandi, Venkataramana - Dell Team 2024-03-19 09:18:18 RE: Query on Postgres SQL transaction