Обсуждение: Set timeout just on a query?

Поиск
Список
Период
Сортировка

Set timeout just on a query?

От
Shaozhong SHI
Дата:
Can timeout be set just on a query?

Can we do the following?

Begin

do a query
set timeout 
Exception
report a record

End;

Regards,
David

Re: Set timeout just on a query?

От
Christophe Pettus
Дата:

> On May 9, 2022, at 17:58, Shaozhong SHI <shishaozhong@gmail.com> wrote:
> Begin
> 
> do a query
> set timeout 
> Exception
> report a record
> 
> End;

Yes.  The syntax you are looking for is:

    SET LOCAL statement_timeout = '<value>';

Best,
-- Christophe