diff options
author | Bruce Momjian <bruce@momjian.us> | 2021-03-30 18:34:27 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2021-03-30 18:34:27 -0400 |
commit | 5da9868ed983f95cc1cff80dcd81252a513774f8 (patch) | |
tree | a2e80418e7510442018d52fb94087547ab143583 /src/interfaces/libpq/fe-print.c | |
parent | 6131ffc43ff3d2f566e93f017e56a09e4e717318 (diff) |
In messages, use singular nouns for -1, like we do for +1.
This outputs "-1 year", not "-1 years".
Reported-by: neverov.max@gmail.com
Bug: 16939
Discussion: https://postgr.es/m/16939-cceeb03fb72736ee@postgresql.org
Diffstat (limited to 'src/interfaces/libpq/fe-print.c')
-rw-r--r-- | src/interfaces/libpq/fe-print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index 94219b1825b..af19b3c0a3e 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -303,7 +303,7 @@ PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po) } if (po->header && !po->html3) fprintf(fout, "(%d row%s)\n\n", PQntuples(res), - (PQntuples(res) == 1) ? "" : "s"); + (abs(PQntuples(res)) == 1) ? "" : "s"); if (po->html3 && !po->expanded) fputs("</table>\n", fout); free(fieldMax); @@ -662,7 +662,7 @@ PQdisplayTuples(const PGresult *res, if (!quiet) fprintf(fp, "\nQuery returned %d row%s.\n", PQntuples(res), - (PQntuples(res) == 1) ? "" : "s"); + (abs(PQntuples(res)) == 1) ? "" : "s"); fflush(fp); |