Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noEEZ-0001Ms-5Q for pgsql-sql@arkaria.postgresql.org; Tue, 10 May 2022 01:00:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1noEEY-0004xX-1D for pgsql-sql@arkaria.postgresql.org; Tue, 10 May 2022 01:00:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noEEX-0004xM-P7 for pgsql-sql@lists.postgresql.org; Tue, 10 May 2022 01:00:13 +0000 Received: from smtp76.ord1d.emailsrvr.com ([184.106.54.76]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1noEEV-0005rO-Eu for pgsql-sql@lists.postgresql.org; Tue, 10 May 2022 01:00:12 +0000 X-Auth-ID: xof@thebuild.com Received: by smtp2.relay.ord1d.emailsrvr.com (Authenticated sender: xof-AT-thebuild.com) with ESMTPSA id 61258200A0; Mon, 9 May 2022 21:00:09 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: Set timeout just on a query? From: Christophe Pettus In-Reply-To: Date: Mon, 9 May 2022 18:00:08 -0700 Cc: pgsql-sql Content-Transfer-Encoding: 7bit Message-Id: <25AF5D7A-0479-43D2-8427-100489E76F29@thebuild.com> References: To: Shaozhong SHI X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Classification-ID: bbfa9024-0674-46a2-ab61-64f8750a9521-1-1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On May 9, 2022, at 17:58, Shaozhong SHI wrote: > Begin > > do a query > set timeout > Exception > report a record > > End; Yes. The syntax you are looking for is: SET LOCAL statement_timeout = ''; Best, -- Christophe