On 2020-Jul-09, movead.li@highgo.ca wrote:
> >> ISTM that a reasonable compromise is that if you use -x (or -c, -m, -O)
> >> and the input value is outside the range supported by existing files,
> >> then it's a fatal error; unless you use --force, which turns it into
> >> just a warning.
>
> >One potential problem is that you might be using --force for some
> >other reason and end up forcing this, too. But maybe that's OK.
> Yes it's true, so I try to add a new option to control this behavior, you
> can see it in the last mail with attach.
It may be OK actually; if you're doing multiple dangerous changes, you'd
use --dry-run beforehand ... No? (It's what *I* would do, for sure.)
Which in turns suggests that it would good to ensure that --dry-run
*also* emits a warning (not an error, so that any other warnings can
also be thrown and the user gets the full picture).
I think adding multiple different --force switches makes the UI more
complex for little added value.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services