Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c3c86ae

Browse files
committed
psql: Re-allow -1 together with -c or -l
1 parent b8fd1a0 commit c3c86ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/bin/psql/startup.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,9 @@ main(int argc, char *argv[])
162162
}
163163

164164
/* Bail out if -1 was specified but will be ignored. */
165-
if (options.single_txn && options.action != ACT_FILE)
165+
if (options.single_txn && options.action != ACT_FILE && options.action == ACT_NOTHING)
166166
{
167-
if (options.action == ACT_NOTHING)
168-
fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname);
169-
else
170-
fprintf(stderr, _("%s: -1 is incompatible with -c and -l\n"), pset.progname);
167+
fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname);
171168
exit(EXIT_FAILURE);
172169
}
173170

0 commit comments

Comments
 (0)