From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: bt22kawamotok <bt22kawamotok@oss.nttdata.com>
Cc: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PATCH]Feature improvement for MERGE tab completion
Date: Tue, 20 Sep 2022 17:51:05 +0200
Message-ID: <20220920155105.y7rb57pb5fpoxmln@alvherre.pgsql> (raw)
In-Reply-To: <4522079f-256a-9756-7ece-f74fb702c85d@oss.nttdata.com>
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)
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, masao.fujii@oss.nttdata.com, bt22kawamotok@oss.nttdata.com, Shinya11.Kato@oss.nttdata.com
Subject: Re: [PATCH]Feature improvement for MERGE tab completion
In-Reply-To: <20220920155105.y7rb57pb5fpoxmln@alvherre.pgsql>
* 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