mirror of
https://github.com/postgres/postgres.git
synced 2025-05-08 07:21:33 +03:00
psql: Fix exit status when query is canceled
Because of a small thinko in 7844c9918a43b494adde3575891d217a37062378, 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.
This commit is contained in:
parent
5c013e620c
commit
4a6de748d3
@ -1114,7 +1114,7 @@ SendQuery(const char *query)
|
|||||||
pset.crosstab_flag || !is_select_command(query))
|
pset.crosstab_flag || !is_select_command(query))
|
||||||
{
|
{
|
||||||
/* Default fetch-it-all-and-print mode */
|
/* Default fetch-it-all-and-print mode */
|
||||||
OK = (ExecQueryAndProcessResults(query, &elapsed_msec, &svpt_gone, false, NULL, NULL) >= 0);
|
OK = (ExecQueryAndProcessResults(query, &elapsed_msec, &svpt_gone, false, NULL, NULL) > 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user