@@ -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- */
18121807if (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. */
18131810errdetail ("There are %d other session(s) and %d prepared transaction(s) using the database." ,
18141811notherbackends ,npreparedxacts );
18151812else 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 );
18181817else
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 );
18211822return 0 ;/* just to keep ereport macro happy */
18221823}
18231824