1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-25 21:42:33 +03:00

psql: Re-allow -1 together with -c or -l

This commit is contained in:
Peter Eisentraut 2013-06-17 21:53:33 -04:00
parent b8fd1a09f3
commit c3c86ae2af

View File

@ -162,12 +162,9 @@ main(int argc, char *argv[])
} }
/* Bail out if -1 was specified but will be ignored. */ /* Bail out if -1 was specified but will be ignored. */
if (options.single_txn && options.action != ACT_FILE) if (options.single_txn && options.action != ACT_FILE && options.action == ACT_NOTHING)
{ {
if (options.action == ACT_NOTHING) fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname);
fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname);
else
fprintf(stderr, _("%s: -1 is incompatible with -c and -l\n"), pset.progname);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }