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 1hT7zv-0007aa-Nf for pgsql-committers@arkaria.postgresql.org; Tue, 21 May 2019 16:52:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hT7zs-0006Ci-R6 for pgsql-committers@arkaria.postgresql.org; Tue, 21 May 2019 16:52:16 +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 1hT7zs-0006Ca-K9 for pgsql-committers@lists.postgresql.org; Tue, 21 May 2019 16:52:16 +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 1hT7zk-0004Cp-LU; Tue, 21 May 2019 16:52:15 +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 x4LGpsRF015449; Tue, 21 May 2019 12:51:54 -0400 From: Tom Lane To: Andres Freund cc: Peter Eisentraut , Michael Paquier , Fujii Masao , Fujii Masao , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value. In-reply-to: <20190521160020.wckjt7ggkwzwr4cj@alap3.anarazel.de> References: <20190520163652.l7ibpe52pbq6lecc@alap3.anarazel.de> <20190520164908.t653bdbfjcn3d35p@alap3.anarazel.de> <23559.1558374415@sss.pgh.pa.us> <20190520180027.zyxosts5yrf2i7mh@alap3.anarazel.de> <24497.1558375780@sss.pgh.pa.us> <20190520203505.zoeitjlehqypgx26@alap3.anarazel.de> <21766.1558397960@sss.pgh.pa.us> <20190521004717.qsktdsugj3shagco@alap3.anarazel.de> <15696.1558448457@sss.pgh.pa.us> <20190521160020.wckjt7ggkwzwr4cj@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 21 May 2019 09:00:20 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15447.1558457514.1@sss.pgh.pa.us> Date: Tue, 21 May 2019 12:51:54 -0400 Message-ID: <15448.1558457514@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2019-05-21 10:20:57 -0400, Tom Lane wrote: >> The least invasive way to do that seems to be as attached, building a >> little knowledge into pg_regress's psql_command() function. Alternatively >> we could add a "bool quiet" parameter to that function so that callers >> had to say what to do, but I'm not sure that's an improvement. > It's not overly pretty, but also not that bad. I was wondering whether > we could make psql_command accept multiple statements (annoying due to > argument passing - although I guess we could switch to using numeric > references to arguments), use putenv to put client_min_messages into > PGOPTIONS (to finnicky to remove again), have psql_command pass the > command to psql via stdin (more code needed for pipe setup). So I think > we can just go with what you're proposing. Although I also could just go > with always supressing notices in psql_command(). I think it's better to only suppress where we have a reason to expect a notice; unexpected notices are the kind of thing you want a test to find. Another angle on this is that multiple -c switches only work back to psql 9.6. Before that it only honors the last -c switch, so that this change has no effect. I'm only proposing that we apply this change in HEAD, so it would only matter for cross-version-upgrade tests, and I think that "no effect" should be acceptable in those. Alternatively we could go with the stdin approach, but as you say, that seems like it takes more code than this is worth. regards, tom lane