Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hifu0-0006jD-Ns for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2019 14:06:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hiftz-00039O-J6 for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Jul 2019 14:06:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hiftz-000363-8W for pgsql-hackers@lists.postgresql.org; Wed, 03 Jul 2019 14:06:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hiftx-0006EN-7L for pgsql-hackers@postgresql.org; Wed, 03 Jul 2019 14:06:26 +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 x63E688o031002; Wed, 3 Jul 2019 10:06:08 -0400 From: Tom Lane To: Fabien COELHO cc: David Fetter , Arthur Zakirov , Corey Huinker , PostgreSQL Development Subject: Re: [PATCH v4] Add \warn to psql In-reply-to: References: <20190427171548.GM28936@fetter.org> <20190428145813.GO28936@fetter.org> <20190429041106.GB2954@fetter.org> <20190429141710.GD2954@fetter.org> <10811be6-cd8d-eadb-9b70-7a6e72ed4ee5@gmail.com> <20190501073857.GY28936@fetter.org> <11038.1562098250@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Wed, 03 Jul 2019 09:05:28 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31000.1562162768.1@sss.pgh.pa.us> Date: Wed, 03 Jul 2019 10:06:08 -0400 Message-ID: <31001.1562162768@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: > The point is that there would be at least *one* TAP tests so that many > other features of psql, although not all, can be tested. I have been > reviewing quite a few patches without tests because of this lack of > infrastructure, and no one patch is ever going to justify a TAP test on > its own. It has to start somewhere. Currently psql coverage is abysmal, > around 40% of lines & functions are called by the whole non regression > tests, despite the hundreds of psql-relying tests. Yeah, but the point I was trying to make is that that's mostly down to laziness. I see no reason that we couldn't be covering a lot of these features in src/test/regress/sql/psql.sql, with far less overhead. The interactive aspects of psql can't be tested that way ... but since this patch doesn't actually provide any way to test those, it's not much of a proof-of-concept. IOW, the blocking factor here is not "does src/bin/psql/t/ exist", it's "has somebody written a test that moves the coverage needle meaningfully". I'm not big on adding a bunch of overhead first and just hoping somebody will do something to make it worthwhile later. regards, tom lane