Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit84f2f5c

Browse files
committed
Fix to use the same format specifiers in both branches of a ngettext().
Zdenek Kotala
1 parent6ec0753 commit84f2f5c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/bin/psql/describe.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
1010
*
11-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.212 2009/05/05 02:29:06 tgl Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.213 2009/05/27 20:47:55 petere Exp $
1212
*/
1313
#include"postgres_fe.h"
1414

@@ -2036,7 +2036,7 @@ describeRoles(const char *pattern, bool verbose)
20362036
if (conns==0)
20372037
appendPQExpBuffer(&buf,_("No connections"));
20382038
else
2039-
appendPQExpBuffer(&buf,ngettext("1 connection","%d connections",conns),conns);
2039+
appendPQExpBuffer(&buf,ngettext("%d connection","%d connections",conns),conns);
20402040
}
20412041

20422042
attr[i]=pg_strdup(buf.data);

‎src/bin/psql/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.112 2009/04/11 14:11:45 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.113 2009/05/27 20:47:55 petere Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -2348,7 +2348,7 @@ printQuery(const PGresult *result, const printQueryOpt *opt, FILE *fout, FILE *f
23482348
chardefault_footer[100];
23492349

23502350
total_records=opt->topt.prior_records+cont.nrows;
2351-
snprintf(default_footer,100,ngettext("(1 row)","(%lu rows)",total_records),total_records);
2351+
snprintf(default_footer,100,ngettext("(%lu row)","(%lu rows)",total_records),total_records);
23522352

23532353
printTableAddFooter(&cont,default_footer);
23542354
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp