Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value.
Date
Msg-id 22941.1558399941@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value.  (Andres Freund <andres@anarazel.de>)
List pgsql-committers
Andres Freund <andres@anarazel.de> 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 = warning; DROP DATABASE 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



pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Make VACUUM accept 1 and 0 as a boolean value.