aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2009-03-26 22:26:08 +0000
committerPeter Eisentraut <peter_e@gmx.net>2009-03-26 22:26:08 +0000
commit8032d76b5bcb037e6bcb4b5615432d4f3842c523 (patch)
treeaec09ebeb02b20d8f0b9833f819fcd60ae315d07 /src/backend/executor
parent845693f70f9c49ada509187b153848c47a32b530 (diff)
downloadpostgresql-8032d76b5bcb037e6bcb4b5615432d4f3842c523.tar.gz
postgresql-8032d76b5bcb037e6bcb4b5615432d4f3842c523.zip
Gettext plural support
In the backend, I changed only a handful of exemplary or important-looking instances to make use of the plural support; there is probably more work there. For the rest of the source, this should cover all relevant cases.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/execQual.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c
index f74a5da6b28..a1e2589162c 100644
--- a/src/backend/executor/execQual.c
+++ b/src/backend/executor/execQual.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.241 2009/01/09 15:46:10 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/execQual.c,v 1.242 2009/03/26 22:26:06 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -616,7 +616,9 @@ ExecEvalVar(ExprState *exprstate, ExprContext *econtext,
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("table row type and query-specified row type do not match"),
- errdetail("Table row contains %d attributes, but query expects %d.",
+ errdetail(ngettext("Table row contains %d attribute, but query expects %d.",
+ "Table row contains %d attributes, but query expects %d.",
+ slot_tupdesc->natts),
slot_tupdesc->natts, var_tupdesc->natts)));
else if (var_tupdesc->natts < slot_tupdesc->natts)
needslow = true;
@@ -1041,7 +1043,9 @@ init_fcache(Oid foid, FuncExprState *fcache,
if (list_length(fcache->args) > FUNC_MAX_ARGS)
ereport(ERROR,
(errcode(ERRCODE_TOO_MANY_ARGUMENTS),
- errmsg("cannot pass more than %d arguments to a function",
+ errmsg(ngettext("cannot pass more than %d argument to a function",
+ "cannot pass more than %d arguments to a function",
+ FUNC_MAX_ARGS),
FUNC_MAX_ARGS)));
/* Set up the primary fmgr lookup information */
@@ -1310,7 +1314,9 @@ tupledesc_match(TupleDesc dst_tupdesc, TupleDesc src_tupdesc)
ereport(ERROR,
(errcode(ERRCODE_DATATYPE_MISMATCH),
errmsg("function return row and query-specified return row do not match"),
- errdetail("Returned row contains %d attributes, but query expects %d.",
+ errdetail(ngettext("Returned row contains %d attribute, but query expects %d.",
+ "Returned row contains %d attributes, but query expects %d.",
+ src_tupdesc->natts),
src_tupdesc->natts, dst_tupdesc->natts)));
for (i = 0; i < dst_tupdesc->natts; i++)