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 1oafWk-0000s1-GA for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Sep 2022 15:51:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oafWj-0002ax-3I for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Sep 2022 15:51:13 +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 1oafWi-0002ao-Pr for pgsql-hackers@lists.postgresql.org; Tue, 20 Sep 2022 15:51:12 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oafWg-0000Ap-6c for pgsql-hackers@postgresql.org; Tue, 20 Sep 2022 15:51:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BD22B5C00C0; Tue, 20 Sep 2022 11:51:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 20 Sep 2022 11:51:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1663689068; x=1663775468; bh=5 5+xhpmWIikB8sG6duunQgCn7rcZWsgBQ+EufFasDcw=; b=B+lHb62eZeTsoYWUY yL2Q7gG5ZpYF49DEYK69L4otx+cabDXY/+RfjDnlXGpPvsmE+apWsHJo6AyUB7Fe JFD10fVX/IQTBFIpyxERAc+28le+piXRxA5ntjoQiGjh2AmaaAyHRefvtSamOUrb ASQFUyXMMxnP7Ol4R+OCHb2qI2DNLJMNusMWXY1ZSHZGRq+51XDfv4j8vga79VNK yfwdvLVXfnaXIkuq5mk3inLK0biy/4OWxNZ/9cb0vs3wUMtzKLcxJISW0YvuSLxD DOd+gJN724DfDSCJAZi5HszYHtTA4gwRHpmWI3qBgFPLUyp7BwMbAOMI9NvHPDDC 7N0kQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvledgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Sep 2022 11:51:07 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id CC5D938F; Tue, 20 Sep 2022 17:51:05 +0200 (CEST) Date: Tue, 20 Sep 2022 17:51:05 +0200 From: Alvaro Herrera To: Fujii Masao Cc: bt22kawamotok , Shinya Kato , pgsql-hackers@postgresql.org Subject: Re: [PATCH]Feature improvement for MERGE tab completion Message-ID: <20220920155105.y7rb57pb5fpoxmln@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4522079f-256a-9756-7ece-f74fb702c85d@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Sep-18, Fujii Masao wrote: > The tab-completion code for MERGE was added in the middle of that for LOCK TABLE. > This would be an oversight of the commit that originally supported tab-completion > for MERGE. I fixed this issue. Argh, thanks. > "MERGE" was tab-completed with just after "EXPLAIN" or "EXPLAIN ANALYZE", etc. > Since "INTO" always follows "MERGE", it's better to complete with "MERGE INTO" > there. I replaced "MERGE" with "MERGE INTO" in those tab-completions. OK, that would be similar to REFRESH MATERIALIZED VIEW. The rules starting at line 4111 make me a bit nervous, since nowhere we're restricting them to operating only on MERGE lines. I don't think it's a real problem since USING is not terribly common anyway. Likewise for the ones with WHEN [NOT] MATCHED. I kinda wish we had a way to search for stuff like "keyword MERGE appears earlier in the command", but we don't have that. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "I'm always right, but sometimes I'm more right than other times." (Linus Torvalds)