Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ci5Lz-0002r1-Vw for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Feb 2017 20:23:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1ci5Lz-0000bH-Ip for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Feb 2017 20:23:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ci5KV-0005bK-L6 for pgsql-hackers@postgresql.org; Sun, 26 Feb 2017 20:22:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ci5KS-0001DJ-8R for pgsql-hackers@postgresql.org; Sun, 26 Feb 2017 20:22:02 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v1QKLuY5019658; Sun, 26 Feb 2017 15:21:56 -0500 From: Tom Lane To: Robert Haas cc: Pavel Stehule , Kyotaro HORIGUCHI , Michael Paquier , PostgreSQL Hackers Subject: Re: IF (NOT) EXISTS in psql-completion In-reply-to: References: <20170203.171712.150614683.horiguchi.kyotaro@lab.ntt.co.jp> <20170214.195152.59283261.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Robert Haas message dated "Mon, 27 Feb 2017 00:13:34 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19656.1488140516.1@sss.pgh.pa.us> Date: Sun, 26 Feb 2017 15:21:56 -0500 Message-ID: <19657.1488140516@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Robert Haas writes: > Yeah, maybe, but we'd need a committer to take more of an interest in > this patch series. Personally, I'm wondering why we need a series of > 19 patches to add tab completion support for IF NOT EXISTS. The > feature which is the subject of this thread arrives in patch 0017, and > a lot of the patches which come before that seem to change a lot of > stuff without actually improving much that would really benefit users. FWIW, one reason this committer hasn't jumped in is that we already rewrote tab-complete.c pretty completely in 9.6. If we accept a patch that completely rewrites it again, we're going to be faced with maintaining three fundamentally different implementations for the next three-plus years (until 9.5 dies). Admittedly, we don't back-patch fixes in tab-complete.c every week, but a look at the git history says we do need to do that several times a year. Also, the nature of the primary refactoring (changing the big else-chain into standalone ifs, if I read it correctly) is particularly bad from a back-patching standpoint because all you have to do is insert an "else", or fail to insert one, to silently and almost completely break either one or the other branch. And I don't really understand why that's a good idea anyway: surely we can return at most one set of completions, so how is turning the function into a lot of independent actions a win? So I'd be a whole lot happier if it didn't do that. Can we really not add the desired features in a more localized fashion? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers