From c3c86ae2aff67676a49ec84240f1d6a482f359cb Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Mon, 17 Jun 2013 21:53:33 -0400
Subject: [PATCH] psql: Re-allow -1 together with -c or -l

---
 src/bin/psql/startup.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index 831e1b3ca6f..1c9f7a568a1 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -162,12 +162,9 @@ main(int argc, char *argv[])
 	}
 
 	/* 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);
-		else
-			fprintf(stderr, _("%s: -1 is incompatible with -c and -l\n"), pset.progname);
+		fprintf(stderr, _("%s: -1 can only be used in non-interactive mode\n"), pset.progname);
 		exit(EXIT_FAILURE);
 	}
 
-- 
GitLab