diff options
author | Bruce Momjian <bruce@momjian.us> | 2021-05-01 10:42:44 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2021-05-01 10:42:44 -0400 |
commit | 651d005e76bc0b9542615f609b4d0d946035dc58 (patch) | |
tree | 091685dde4a23011030907d96d49b8749417cc78 /src/interfaces/libpq/fe-print.c | |
parent | e6f9539dc32473793c03cbe95bc099ee0a199c73 (diff) | |
download | postgresql-651d005e76bc0b9542615f609b4d0d946035dc58.tar.gz |
Revert use singular for -1 (commits 9ee7d533da and 5da9868ed9
Turns out you can specify negative values using plurals:
https://english.stackexchange.com/questions/9735/is-1-followed-by-a-singular-or-plural-noun
so the previous code was correct enough, and consistent with other usage
in our code. Also add comment in the two places where this could be
confused.
Reported-by: Noah Misch
Diagnosed-by: 20210425115726.GA2353095@rfd.leadboat.com
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 af19b3c0a3..94219b1825 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), - (abs(PQntuples(res)) == 1) ? "" : "s"); + (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), - (abs(PQntuples(res)) == 1) ? "" : "s"); + (PQntuples(res) == 1) ? "" : "s"); fflush(fp); |