Re: Set timeout just on a query? - Mailing list pgsql-sql

From Christophe Pettus
Subject Re: Set timeout just on a query?
Date
Msg-id 25AF5D7A-0479-43D2-8427-100489E76F29@thebuild.com
Whole thread Raw
In response to Set timeout just on a query?  (Shaozhong SHI <shishaozhong@gmail.com>)
List pgsql-sql

> 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



pgsql-sql by date:

Previous
From: Shaozhong SHI
Date:
Subject: Set timeout just on a query?
Next
From: kimaidou
Date:
Subject: Count child objects for each line of a table: LEFT JOIN, LATERAL JOIN or subqueries ?