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 1mXDXp-0005Cn-FB for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Oct 2021 02:17:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXDXm-0000NK-O5 for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Oct 2021 02:17:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXDXm-0000NC-G4 for pgsql-hackers@lists.postgresql.org; Mon, 04 Oct 2021 02:17:30 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXDXi-0001SX-Pi for pgsql-hackers@lists.postgresql.org; Mon, 04 Oct 2021 02:17:29 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 960AA60081; Mon, 4 Oct 2021 11:17:19 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.3 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 04 Oct 2021 11:17:19 +0900 From: bt21tanigaway To: Shinya11.Kato@nttdata.com Cc: masao.fujii@oss.nttdata.com, pgsql-hackers@lists.postgresql.org Subject: =?UTF-8?Q?Re=3A_=28LOCK_TABLE_options=29_=E2=80=9CONLY=E2=80=9D_?= =?UTF-8?Q?and_=E2=80=9CNOWAIT=E2=80=9D_are_not_yet_implemented?= In-Reply-To: References: <79967bce-cc80-1941-463b-883bd5606790@oss.nttdata.com> <81b150bf40a3dad24fb8674feb07308e@oss.nttdata.com> <913e1abb8fca30aeb370343d47876a0c@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: bt21tanigaway@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> else if (Matches("LOCK", MatchAny, "IN", "ACCESS|ROW") || >> - Matches("LOCK", "TABLE", MatchAny, "IN", "ACCESS|ROW")) >> + Matches("LOCK", "TABLE", MatchAny, "IN", "ACCESS|ROW") || >> + Matches("LOCK", "ONLY", MatchAny, "IN", "ACCESS|ROW") || >> + Matches("LOCK", "TABLE", "ONLY", MatchAny, "IN", "ACCESS|ROW")) > I think this code is redundant, so I change following. > --- > else if (HeadMatches("LOCK") && TailMatches("IN", "ACCESS|ROW")) > --- > I created the patch, and attached it. Do you think? Thank you for update! I think that your code is more concise than mine. There seems to be no problem. Regards, Koyu Tanigawa