Re: set local statement_timeout within a stored procedure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Abraham, Danny" <danny_abraham(at)bmc(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: set local statement_timeout within a stored procedure
Date: 2024-03-19 13:40:29
Message-ID: 3812228.1710855629@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Abraham, Danny" <danny_abraham(at)bmc(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2024-03-19 15:06:25 Re: Postgres database encryption
Previous Message Johnathan Tiamoh 2024-03-19 13:22:24 Postgres database encryption