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 1hSt18-0007xw-WB for pgsql-committers@arkaria.postgresql.org; Tue, 21 May 2019 00:52:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hSt17-0008Lb-Ji for pgsql-committers@arkaria.postgresql.org; Tue, 21 May 2019 00:52:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSt17-0008LO-9Y for pgsql-committers@lists.postgresql.org; Tue, 21 May 2019 00:52:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSt14-0000py-Oi; Tue, 21 May 2019 00:52:32 +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 x4L0qLYv022942; Mon, 20 May 2019 20:52:21 -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: <20190521004717.qsktdsugj3shagco@alap3.anarazel.de> References: <26460.1558366996@sss.pgh.pa.us> <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> Comments: In-reply-to Andres Freund message dated "Mon, 20 May 2019 17:47:17 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22940.1558399941.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 20 May 2019 20:52:21 -0400 Message-ID: <22941.1558399941@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund writes: > On 2019-05-20 20:19:20 -0400, Tom Lane wrote: >> The other thing I had to do below was to suppress "NOTICE: database >> "regression" does not exist, skipping". The added createdb is a >> mighty expensive and grotty way to do that, but I didn't immediately >> see a better one. > Hm. Perhaps we ought to just have pg_regress set client_min_messages to > something less noisy when running DROP DATABASE? I don't think any > pg_regress caller benefits from having it. Yeah, the first thing I tried was - psql_command("postgres", "DROP DATABASE IF EXISTS \"%s\"", dbname); + psql_command("postgres", "SET client_min_messages =3D warning; DROP DATA= BASE IF EXISTS \"%s\"", dbname); in pg_regress.c, but that fails with "ERROR: DROP DATABASE cannot run inside a transaction block". It's probably possible to improve this but it'll take a bit of surgery. regards, tom lane