Re: pg_dumpall --exclude-database option

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: pg_dumpall --exclude-database option
Date: 2018-11-05 07:42:23
Message-ID: 20181105074223.GG1718@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 31, 2018 at 05:44:26PM +0100, Fabien COELHO wrote:
> Patch v4 applies cleanly, compiles, doc generation ok, global & local tests
> ok.

+# also fails for -r and -t, but it seems pointless to add more tests
for those.
+command_fails_like(
+ [ 'pg_dumpall', '--exclude-database=foo', '--globals-only' ],
+ qr/\Qpg_dumpall: option --exclude-database cannot be used
together with -g\/--globals-only\E/,
+ 'pg_dumpall: option --exclude-database cannot be used together
with -g/--globals-only');

Usually testing all combinations is preferred, as well as having one
error message for each pattern, which is also more consistent with all
the other sanity checks in pg_dumpall.c and such.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2018-11-05 08:03:02 Re: New vacuum option to do only freezing
Previous Message Michael Paquier 2018-11-05 07:28:09 Re: Strange failure in LWLock on skink in REL9_5_STABLE