|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.211 2009/01/01 17:23:45 momjian Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.212 2009/03/26 22:26:06 petere Exp $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
@@ -89,7 +89,9 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
89 | 89 | if (list_length(fargs) > FUNC_MAX_ARGS)
|
90 | 90 | ereport(ERROR,
|
91 | 91 | (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
92 |
| - errmsg("cannot pass more than %d arguments to a function", |
| 92 | + errmsg(ngettext("cannot pass more than %d argument to a function", |
| 93 | + "cannot pass more than %d arguments to a function", |
| 94 | + FUNC_MAX_ARGS), |
93 | 95 | FUNC_MAX_ARGS),
|
94 | 96 | parser_errposition(pstate, location)));
|
95 | 97 |
|
@@ -259,7 +261,9 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
|
259 | 261 | if (nargsplusdefs >= FUNC_MAX_ARGS)
|
260 | 262 | ereport(ERROR,
|
261 | 263 | (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
262 |
| - errmsg("cannot pass more than %d arguments to a function", |
| 264 | + errmsg(ngettext("cannot pass more than %d argument to a function", |
| 265 | + "cannot pass more than %d arguments to a function", |
| 266 | + FUNC_MAX_ARGS), |
263 | 267 | FUNC_MAX_ARGS),
|
264 | 268 | parser_errposition(pstate, location)));
|
265 | 269 |
|
@@ -538,7 +542,9 @@ func_select_candidate(int nargs,
|
538 | 542 | if (nargs > FUNC_MAX_ARGS)
|
539 | 543 | ereport(ERROR,
|
540 | 544 | (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
541 |
| - errmsg("cannot pass more than %d arguments to a function", |
| 545 | + errmsg(ngettext("cannot pass more than %d argument to a function", |
| 546 | + "cannot pass more than %d arguments to a function", |
| 547 | + FUNC_MAX_ARGS), |
542 | 548 | FUNC_MAX_ARGS)));
|
543 | 549 |
|
544 | 550 | /*
|
@@ -1413,7 +1419,9 @@ LookupFuncNameTypeNames(List *funcname, List *argtypes, bool noError)
|
1413 | 1419 | if (argcount > FUNC_MAX_ARGS)
|
1414 | 1420 | ereport(ERROR,
|
1415 | 1421 | (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
1416 |
| - errmsg("functions cannot have more than %d arguments", |
| 1422 | + errmsg(ngettext("functions cannot have more than %d argument", |
| 1423 | + "functions cannot have more than %d arguments", |
| 1424 | + FUNC_MAX_ARGS), |
1417 | 1425 | FUNC_MAX_ARGS)));
|
1418 | 1426 |
|
1419 | 1427 | args_item = list_head(argtypes);
|
@@ -1451,7 +1459,9 @@ LookupAggNameTypeNames(List *aggname, List *argtypes, bool noError)
|
1451 | 1459 | if (argcount > FUNC_MAX_ARGS)
|
1452 | 1460 | ereport(ERROR,
|
1453 | 1461 | (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
|
1454 |
| - errmsg("functions cannot have more than %d arguments", |
| 1462 | + errmsg(ngettext("functions cannot have more than %d argument", |
| 1463 | + "functions cannot have more than %d arguments", |
| 1464 | + FUNC_MAX_ARGS), |
1455 | 1465 | FUNC_MAX_ARGS)));
|
1456 | 1466 |
|
1457 | 1467 | i = 0;
|
|
0 commit comments