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 1k4xUZ-0007i1-Rg for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Aug 2020 02:24:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k4xUY-0002VB-Qi for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Aug 2020 02:24:50 +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 1k4xUY-0002V3-Ej for pgsql-hackers@lists.postgresql.org; Mon, 10 Aug 2020 02:24:50 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1k4xUV-0001N9-1K for pgsql-hackers@lists.postgresql.org; Mon, 10 Aug 2020 02:24:48 +0000 Received: by mail-io1-xd43.google.com with SMTP id v6so7383083iow.11 for ; Sun, 09 Aug 2020 19:24:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=PnVPpQI2MWAVWz0hdW2aCM9BgVXsU5f4TZGkUYKc4tw=; b=yLITmRM58ok+LW13AtgYjYfIJcycmULadNxNWDDWVh5LWCIXkBZ7vkJb/T5f7US3Bq 3Vzd3kf8AYNX+FKxLGuzR6Xn/wrU7Y54RcjvRHTTUF6ZKksOlW5de+4MSmqXrAFUjOd1 IicCnqk/MakvltQ+km7z0kTKj2SDxInDS7TH7pHq79gT8pnylgo6ChoiUB6SVCuxe8pT 8X6ewke/TxNl6RZGphd/k3DqpgHfcMZkTgZZ2p086cumK9AXfQXWjnN+P3tBvkKczs62 9607HuOHLfQ2BbySCBEQpNWwGaKj7K8AgpIzwkcBIMroIDEyzIa8qDY38M1YfTEhQIEs 53CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PnVPpQI2MWAVWz0hdW2aCM9BgVXsU5f4TZGkUYKc4tw=; b=MyfYzgcPLE9RekzRDmkU3cOvBPfiO3z4p8ko/X9r5zGZDhRgdUCy7i7Ekbh//2nuoD mzttdJMlQbok1Ji4hxlK0pE+ME1F4iAPnrZsSLreAthLMrduijVrjNQqRxbtlcEAplCB HYh4WLzfdxQBwvWthWFhXQbVqnnjy2WHVc1dOei7vir2uYC1hPV+6/hCLXVH0WXwGT3z VwA2jGJaML6ZKFaVzF4+/SXeLCM2QkuD2HR8sMtGF4/AWdF63s6KdCxwlaQrYrM/l+vm Vc2zhSqJiFc77O8Db5s+wr38uJuEHRDbFJtu7s1FP8dNHAavX1CwIXk4yb6jwzaBTUYB rRjA== X-Gm-Message-State: AOAM533MkTfjxc5u1QF1hjbAwM/0MCxAyPuy1odwO7GiJfcDMc9Gm2k5 8RXeb1qvrlUrBbeeBNhjz33miw== X-Google-Smtp-Source: ABdhPJxuR2Eddy+D2tu2fGuuqsq+4ijU9MGHoMkeLjLJP8wzwQEmX80VdDhEcg5aVYFAy2tNUOuY6Q== X-Received: by 2002:a6b:b4c8:: with SMTP id d191mr15379693iof.174.1597026285686; Sun, 09 Aug 2020 19:24:45 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n9sm10265184iox.43.2020.08.09.19.24.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Aug 2020 19:24:44 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 8D25F8002BE; Sun, 9 Aug 2020 21:24:43 -0500 (CDT) Date: Sun, 9 Aug 2020 21:24:43 -0500 From: Justin Pryzby To: Michael Paquier Cc: Alexey Kondratov , Masahiko Sawada , Steve Singer , pgsql-hackers@lists.postgresql.org, Alvaro Herrera , Robert Haas , Alexander Korotkov , Masahiko Sawada , Jose Luis Tallon Subject: Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly Message-ID: <20200810022443.GI20473@telsasoft.com> References: <20200401115718.GQ14618@telsasoft.com> <20200401130836.GT14618@telsasoft.com> <20200403182712.GR14618@telsasoft.com> <20200406184406.GF2228@telsasoft.com> <9b6a6cec134451550b74aa2ffd1446d0@postgrespro.ru> <20200407204406.GR2228@telsasoft.com> <20200412013352.GA2491@telsasoft.com> <20200426175614.GT28974@telsasoft.com> <20200809110252.GD17986@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200809110252.GD17986@paquier.xyz> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sun, Aug 09, 2020 at 08:02:52PM +0900, Michael Paquier wrote: > I have been looking at 0001 as a start, and your patch is incorrect on > a couple of aspects for the completion of REINDEX: > - "(" is not proposed as a completion option after the initial > REINDEX, and I think that it should. That part of your patch handles REINDEX and REINDEX(*) differently than mine. Yours is technically more correct/complete. But, I recall Tom objected a different patch because of completing to a single char. I think the case is arguable either way: if only some completions are shown, then it hides the others.. https://www.postgresql.org/message-id/14255.1536781029@sss.pgh.pa.us - else if (Matches("REINDEX") || Matches("REINDEX", "(*)")) + else if (Matches("REINDEX")) + COMPLETE_WITH("TABLE", "INDEX", "SYSTEM", "SCHEMA", "DATABASE", "("); + else if (Matches("REINDEX", "(*)")) COMPLETE_WITH("TABLE", "INDEX", "SYSTEM", "SCHEMA", "DATABASE"); > - completion gets incorrect for all the commands once a parenthesized > list of options is present, as CONCURRENTLY goes missing. The rest of your patch looks fine. In my mind, REINDEX(CONCURRENTLY) was the "new way" to write things, and it's what's easy to support, so I think I didn't put special effort into making tab completion itself complete. -- Justin