File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1804,20 +1804,21 @@ check_db_file_conflict(Oid db_id)
18041804static int
18051805errdetail_busy_db (int notherbackends , int npreparedxacts )
18061806{
1807- /*
1808- * We don't worry about singular versus plural here, since the English
1809- * rules for that don't translate very well. But we can at least avoid
1810- * the case of zero items.
1811- */
18121807 if (notherbackends > 0 && npreparedxacts > 0 )
1808+ /* We don't deal with singular versus plural here, since gettext
1809+ * doesn't support multiple plurals in one string. */
18131810 errdetail ("There are %d other session(s) and %d prepared transaction(s) using the database." ,
18141811 notherbackends , npreparedxacts );
18151812 else if (notherbackends > 0 )
1816- errdetail ("There are %d other session(s) using the database." ,
1817- notherbackends );
1813+ errdetail_plural ("There is %d other session using the database." ,
1814+ "There are %d other sessions using the database." ,
1815+ notherbackends ,
1816+ notherbackends );
18181817 else
1819- errdetail ("There are %d prepared transaction(s) using the database." ,
1820- npreparedxacts );
1818+ errdetail_plural ("There is %d prepared transaction using the database." ,
1819+ "There are %d prepared transactions using the database." ,
1820+ npreparedxacts ,
1821+ npreparedxacts );
18211822 return 0 ; /* just to keep ereport macro happy */
18221823}
18231824
You can’t perform that action at this time.
0 commit comments