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 1o7v1r-0005I6-PP for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2022 08:32:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1o7v1o-0004Q8-UX for pgsql-hackers@arkaria.postgresql.org; Sun, 03 Jul 2022 08:32:28 +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 1o7v1o-0004Pz-Jj for pgsql-hackers@lists.postgresql.org; Sun, 03 Jul 2022 08:32:28 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1o7v1h-0007Zd-Fh for pgsql-hackers@lists.postgresql.org; Sun, 03 Jul 2022 08:32:26 +0000 Received: by mail-qk1-x72b.google.com with SMTP id g1so4811500qkl.9 for ; Sun, 03 Jul 2022 01:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xiKWEvu0g4p98+JgZx6hCXGuj0vyNyv/okLknFzMPrI=; b=C2VwMUVgyJ/YqHkNmqu3HL4VIzAqXy7f6VXHsoHcigKOeBFCruO7nZ5csDzXJca/I4 NOcg0ElPXfFX8IjiCjQkNcOR2LKw1mSa1e5S6gOF66r40JmWGuYVX56lCkhn/aSj0Jng D0xeqiDMfEyxb6arX1njvWHd9J1j6hdGaWAdI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xiKWEvu0g4p98+JgZx6hCXGuj0vyNyv/okLknFzMPrI=; b=h1cfC5oRjuXCHWUGniDcee1rtquD+cL6P2d5PtL1Nj46swxFY/MR9/f8KSqHfZr47O x7Q3sHjeXU2JDsQKh+ZFExxPwUmEYXVUO7YTWSVCqLawjyyKgh2WPvF4BUuD3vJcE0dh 6fKABB+1PkgrZShcqJ8wZuc+Xc/9tL90hMkNqa8m42cSaiVUoIXVfjHHeenpbmrCJZ7n Js1xtlS5RF9HsvFDhPlFUCoQOgVK5HYOHp4rxxAnKbrSjNXp2cluZ1Jvns+GXhu2dnju cwkuBMh4xZWK7OUZd8cBjh1hWKaTXbDyEKAUMgAwnN8ZZncU+RIHMyVMnv0OwUtPJeoH +A6g== X-Gm-Message-State: AJIora/Z0Ejc8lCMNoneQgCuBcRGUAQ3Z28DatnKvkaAvAH5STzRHFrQ Ds7ZTRQ8zx25j2p5DVCtWAQXkg== X-Google-Smtp-Source: AGRyM1tegS+SgO4xBTc4q92rBHFWo6AG12Z+5x2L+69yoiPp4/NDbgJc0Ih3FXcQf3tMW9EKivUGsw== X-Received: by 2002:a05:620a:1538:b0:6af:2187:393b with SMTP id n24-20020a05620a153800b006af2187393bmr16204774qkk.528.1656837140623; Sun, 03 Jul 2022 01:32:20 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id gd7-20020a05622a5c0700b00304f7449e17sm16060489qtb.93.2022.07.03.01.32.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Jul 2022 01:32:19 -0700 (PDT) Date: Sun, 3 Jul 2022 01:32:17 -0700 From: Noah Misch To: Tom Lane Cc: Jeff Janes , PostgreSQL Hackers Subject: Re: 15beta1 tab completion of extension versions Message-ID: <20220703083217.GB2476530@rfd.leadboat.com> References: <1803867.1655596168@sss.pgh.pa.us> <1930937.1655614573@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1930937.1655614573@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Jun 19, 2022 at 12:56:13AM -0400, Tom Lane wrote: > Actually ... after further thought it seems like maybe we should > make this more like other cases rather than less so. ISTM that much > of the issue here is somebody's decision that "TO version" should be > offered as a completion of "UPDATE", which is unlike the way we do this > anywhere else --- the usual thing is to offer "UPDATE TO" as a single > completion. So I'm thinking about the attached. Which are the older completions that offer "UPDATE TO"? I don't see any. > This behaves a little differently from the old code. In v14, > alter extension pg_trgm upd > gives you > alter extension pg_trgm update > and another produces > alter extension pg_trgm update TO "1. > > With this, > alter extension pg_trgm upd > gives you > alter extension pg_trgm update to > and another produces > alter extension pg_trgm update to "1. > > That seems more consistent with other cases, and it's the same > number of presses. I think it makes sense to send UPDATE TO as a single completion in places where no valid command can have the UPDATE without the TO. CREATE RULE foo AS ON UPDATE TO is a candidate, though CREATE RULE completion doesn't do that today. "ALTER EXTENSION hstore UPDATE;" is a valid command (updates to the control file default version). Hence, I think the v14 behavior was better.