From: Christophe Pettus <xof@thebuild.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
Cc: pgsql-sql <pgsql-sql@lists.postgresql.org>
Subject: Re: Set timeout just on a query?
Date: Mon, 9 May 2022 18:00:08 -0700
Message-ID: <25AF5D7A-0479-43D2-8427-100489E76F29@thebuild.com> (raw)
In-Reply-To: <CA+i5JwYsXzYwBT87y2jtch=Lg1s=d+XgJ0sJS0TV8VQT8g_Xtg@mail.gmail.com>
References: <CA+i5JwYsXzYwBT87y2jtch=Lg1s=d+XgJ0sJS0TV8VQT8g_Xtg@mail.gmail.com>
> 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
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: xof@thebuild.com, shishaozhong@gmail.com, pgsql-sql@lists.postgresql.org
Subject: Re: Set timeout just on a query?
In-Reply-To: <25AF5D7A-0479-43D2-8427-100489E76F29@thebuild.com>
References: <CA+i5JwYsXzYwBT87y2jtch=Lg1s=d+XgJ0sJS0TV8VQT8g_Xtg@mail.gmail.com> <25AF5D7A-0479-43D2-8427-100489E76F29@thebuild.com>
* 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