Content-Length: 260305 | pFad | http://github.com/postgrespro/postgres/commit/2598b76bf2bc78af4c65ffab4736c7b49205fc7a

CD psql: Fix exit status when query is canceled · postgrespro/postgres@2598b76 · GitHub
Skip to content

Commit 2598b76

Browse files
committed
psql: Fix exit status when query is canceled
Because of a small thinko in 7844c99, psql -c would exit successfully when a query is canceled. Fix this so that it exits with a nonzero status, just like for all other errors.
1 parent 6cc6619 commit 2598b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bin/psql/common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ SendQuery(const char *query)
11141114
pset.crosstab_flag || !is_select_command(query))
11151115
{
11161116
/* Default fetch-it-all-and-print mode */
1117-
OK = (ExecQueryAndProcessResults(query, &elapsed_msec, &svpt_gone, false, NULL, NULL) >= 0);
1117+
OK = (ExecQueryAndProcessResults(query, &elapsed_msec, &svpt_gone, false, NULL, NULL) > 0);
11181118
}
11191119
else
11201120
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/2598b76bf2bc78af4c65ffab4736c7b49205fc7a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy