From: Tom Lane <tgl@sss.pgh.pa.us>
To: Abraham, Danny <danny_abraham@bmc.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: set local statement_timeout within a stored procedure
Date: Tue, 19 Mar 2024 09:40:29 -0400
Message-ID: <3812228.1710855629@sss.pgh.pa.us> (raw)
In-Reply-To: <SA1PR02MB969875FB9A648A34E70460998E2C2@SA1PR02MB9698.namprd02.prod.outlook.com>
References: <SA1PR02MB969875FB9A648A34E70460998E2C2@SA1PR02MB9698.namprd02.prod.outlook.com>
"Abraham, Danny" <danny_abraham@bmc.com> writes:
> Is there a way to integrate " set local statement_timeout" in a stored procedure?
Not usefully. statement_timeout bounds the time spent for a single
command sent by the client. So by the time you're inside a procedure,
the countdown is already running (or not) for the current command, and
it's too late to change it with effect for that command.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, danny_abraham@bmc.com
Subject: Re: set local statement_timeout within a stored procedure
In-Reply-To: <3812228.1710855629@sss.pgh.pa.us>
References: <SA1PR02MB969875FB9A648A34E70460998E2C2@SA1PR02MB9698.namprd02.prod.outlook.com> <3812228.1710855629@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox