Index: nls.mk =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/src/backend/nls.mk,v retrieving revision 1.6 diff -c -r1.6 nls.mk *** nls.mk 28 Jul 2003 00:25:21 -0000 1.6 --- nls.mk 13 Sep 2003 03:52:55 -0000 *************** *** 7,13 **** GETTEXT_TRIGGERS:= errmsg errdetail errhint errcontext postmaster_error yyerror gettext-files: ! find $(srcdir)/ -name '*.c' -print >$@ my-maintainer-clean: rm -f gettext-files --- 7,13 ---- GETTEXT_TRIGGERS:= errmsg errdetail errhint errcontext postmaster_error yyerror gettext-files: ! find $(srcdir)/ -name '*.[cy]' -print >$@ my-maintainer-clean: rm -f gettext-files Index: parser/gram.y =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/src/backend/parser/gram.y,v retrieving revision 2.432 diff -c -r2.432 gram.y *** parser/gram.y 9 Sep 2003 23:22:20 -0000 2.432 --- parser/gram.y 14 Sep 2003 05:57:58 -0000 *************** *** 969,982 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision must not be negative", ! $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision reduced to maximum allowed, %d", ! $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } --- 969,984 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name (INTERVAL, TIMESTAMP, etc) */ ! errmsg("%s(%d) precision must not be negative", ! "INTERVAL", $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name (INTERVAL, TIMESTAMP, etc) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "INTERVAL", $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } *************** *** 5086,5099 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision must not be negative", ! $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision reduced to maximum allowed, %d", ! $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } $$->typmod = INTERVAL_TYPMOD($3, $5); --- 5088,5103 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name (INTERVAL, TIMESTAMP, etc) */ ! errmsg("%s(%d) precision must not be negative", ! "INTERVAL", $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name (INTERVAL, TIMESTAMP, etc) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "INTERVAL", $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } $$->typmod = INTERVAL_TYPMOD($3, $5); *************** *** 5211,5223 **** if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("NUMERIC precision %d must be between 1 and %d", ! $2, NUMERIC_MAX_PRECISION))); if ($4 < 0 || $4 > $2) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("NUMERIC scale %d must be between 0 and precision %d", ! $4, $2))); $$ = (($2 << 16) | $4) + VARHDRSZ; } --- 5215,5229 ---- if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s precision %d must be between 1 and %d", ! "NUMERIC", $2, NUMERIC_MAX_PRECISION))); if ($4 < 0 || $4 > $2) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s scale %d must be between 0 and precision %d", ! "NUMERIC", $4, $2))); $$ = (($2 << 16) | $4) + VARHDRSZ; } *************** *** 5226,5233 **** if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("NUMERIC precision %d must be between 1 and %d", ! $2, NUMERIC_MAX_PRECISION))); $$ = ($2 << 16) + VARHDRSZ; } --- 5232,5240 ---- if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s precision %d must be between 1 and %d", ! "NUMERIC", $2, NUMERIC_MAX_PRECISION))); $$ = ($2 << 16) + VARHDRSZ; } *************** *** 5244,5256 **** if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("DECIMAL precision %d must be between 1 and %d", ! $2, NUMERIC_MAX_PRECISION))); if ($4 < 0 || $4 > $2) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("DECIMAL scale %d must be between 0 and precision %d", ! $4, $2))); $$ = (($2 << 16) | $4) + VARHDRSZ; } --- 5251,5265 ---- if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s precision %d must be between 1 and %d", ! "DECIMAL", $2, NUMERIC_MAX_PRECISION))); if ($4 < 0 || $4 > $2) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s scale %d must be between 0 and precision %d", ! "DECIMAL", $4, $2))); $$ = (($2 << 16) | $4) + VARHDRSZ; } *************** *** 5259,5266 **** if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("DECIMAL precision %d must be between 1 and %d", ! $2, NUMERIC_MAX_PRECISION))); $$ = ($2 << 16) + VARHDRSZ; } --- 5268,5276 ---- if ($2 < 1 || $2 > NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name, NUMERIC or DECIMAL */ ! errmsg("%s precision %d must be between 1 and %d", ! "DECIMAL", $2, NUMERIC_MAX_PRECISION))); $$ = ($2 << 16) + VARHDRSZ; } *************** *** 5465,5478 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("TIMESTAMP(%d)%s precision must not be negative", ! $3, ($5 ? " WITH TIME ZONE": "")))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("TIMESTAMP(%d)%s precision reduced to maximum allowed, %d", ! $3, ($5 ? " WITH TIME ZONE": ""), MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } --- 5475,5492 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: first %s is a type name (TIMESTAMP, TIME) and second ! %s is WITH TIME ZONE or empty */ ! errmsg("%s(%d)%s precision must not be negative", ! "TIMESTAMP", $3, ($5 ? " WITH TIME ZONE": "")))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: first %s is a type name (TIMESTAMP, TIME) and second ! %s is WITH TIME ZONE or empty */ ! errmsg("%s(%d)%s precision reduced to maximum allowed, %d", ! "TIMESTAMP", $3, ($5 ? " WITH TIME ZONE": ""), MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } *************** *** 5506,5519 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("TIME(%d)%s precision must not be negative", ! $3, ($5 ? " WITH TIME ZONE": "")))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("TIME(%d)%s precision reduced to maximum allowed, %d", ! $3, ($5 ? " WITH TIME ZONE": ""), MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } --- 5520,5533 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("%s(%d)%s precision must not be negative", ! "TIME", $3, ($5 ? " WITH TIME ZONE": "")))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("%s(%d)%s precision reduced to maximum allowed, %d", ! "TIME", $3, ($5 ? " WITH TIME ZONE": ""), MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } *************** *** 6313,6326 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("CURRENT_TIME(%d) precision must not be negative", ! $3))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("CURRENT_TIME(%d) precision reduced to maximum allowed, %d", ! $3, MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } d->typmod = $3; --- 6327,6342 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision must not be negative", ! "CURRENT_TIME", $3))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "CURRENT_TIME", $3, MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } d->typmod = $3; *************** *** 6367,6379 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("CURRENT_TIMESTAMP(%d) precision must not be negative", ! $3))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("CURRENT_TIMESTAMP(%d) precision reduced to maximum allowed, %d", $3, MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } --- 6383,6397 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision must not be negative", ! "CURRENT_TIMESTAMP", $3))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", $3, MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } *************** *** 6420,6433 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("LOCALTIME(%d) precision must not be negative", ! $3))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("LOCALTIME(%d) precision reduced to maximum allowed, %d", ! $3, MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } d->typmod = $3; --- 6438,6453 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision must not be negative", ! "LOCALTIME", $3))); if ($3 > MAX_TIME_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "LOCALTIME", $3, MAX_TIME_PRECISION))); $3 = MAX_TIME_PRECISION; } d->typmod = $3; *************** *** 6474,6487 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("LOCALTIMESTAMP(%d) precision must not be negative", ! $3))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("LOCALTIMESTAMP(%d) precision reduced to maximum allowed, %d", ! $3, MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } d->typmod = $3; --- 6494,6509 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision must not be negative", ! "LOCALTIMESTAMP", $3))); if ($3 > MAX_TIMESTAMP_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "LOCALTIMESTAMP", $3, MAX_TIMESTAMP_PRECISION))); $3 = MAX_TIMESTAMP_PRECISION; } d->typmod = $3; *************** *** 7184,7197 **** if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision must not be negative", ! $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! errmsg("INTERVAL(%d) precision reduced to maximum allowed, %d", ! $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } n->typename->typmod = INTERVAL_TYPMOD($3, $6); --- 7206,7221 ---- if ($3 < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision must not be negative", ! "INTERVAL", $3))); if ($3 > MAX_INTERVAL_PRECISION) { ereport(NOTICE, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), ! /* translator: %s is a type name or SQL keyword (INTERVAL, CURRENT_TIME) */ ! errmsg("%s(%d) precision reduced to maximum allowed, %d", ! "INTERVAL", $3, MAX_INTERVAL_PRECISION))); $3 = MAX_INTERVAL_PRECISION; } n->typename->typmod = INTERVAL_TYPMOD($3, $6); *************** *** 7631,7637 **** else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("OLD used in non-rule query"))); } | NEW { --- 7655,7662 ---- else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is "NEW" or "OLD" */ ! errmsg("%s used in non-rule query", "OLD"))); } | NEW { *************** *** 7640,7646 **** else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("NEW used in non-rule query"))); } ; --- 7665,7672 ---- else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is "NEW" or "OLD" */ ! errmsg("%s used in non-rule query", "NEW"))); } ; *************** *** 7919,7925 **** if (stmt->sortClause) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("multiple ORDER BY clauses not allowed"))); stmt->sortClause = sortClause; } if (forUpdate) --- 7945,7952 ---- if (stmt->sortClause) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is an SQL clause like ORDER BY, LIMIT, etc */ ! errmsg("multiple %s clauses not allowed", "ORDER BY"))); stmt->sortClause = sortClause; } if (forUpdate) *************** *** 7927,7933 **** if (stmt->forUpdate) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("multiple FOR UPDATE clauses not allowed"))); stmt->forUpdate = forUpdate; } if (limitOffset) --- 7954,7961 ---- if (stmt->forUpdate) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is an SQL clause like ORDER BY, LIMIT, etc */ ! errmsg("multiple %s clauses not allowed", "FOR UPDATE"))); stmt->forUpdate = forUpdate; } if (limitOffset) *************** *** 7935,7941 **** if (stmt->limitOffset) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("multiple OFFSET clauses not allowed"))); stmt->limitOffset = limitOffset; } if (limitCount) --- 7963,7970 ---- if (stmt->limitOffset) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is an SQL clause like ORDER BY, LIMIT, etc */ ! errmsg("multiple %s clauses not allowed", "OFFSET"))); stmt->limitOffset = limitOffset; } if (limitCount) *************** *** 7943,7949 **** if (stmt->limitCount) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! errmsg("multiple LIMIT clauses not allowed"))); stmt->limitCount = limitCount; } } --- 7972,7979 ---- if (stmt->limitCount) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), ! /* translator: %s is an SQL clause like ORDER BY, LIMIT, etc */ ! errmsg("multiple %s clauses not allowed", "LIMIT"))); stmt->limitCount = limitCount; } } Index: parser/parse_oper.c =================================================================== RCS file: /home/alvherre/cvs/pgsql-server/src/backend/parser/parse_oper.c,v retrieving revision 1.74 diff -c -r1.74 parse_oper.c *** parser/parse_oper.c 17 Aug 2003 19:58:05 -0000 1.74 --- parser/parse_oper.c 14 Sep 2003 05:30:07 -0000 *************** *** 557,562 **** --- 557,563 ---- if (!noError) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), + /* translator: %s is something like "integer + integer" */ errmsg("operator requires run-time type coercion: %s", op_signature_string(op, 'b', arg1, arg2)))); *************** *** 751,756 **** --- 752,758 ---- if (fdresult == FUNCDETAIL_MULTIPLE) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_FUNCTION), + /* translator: %s is something like "integer + integer" */ errmsg("operator is not unique: %s", op_signature_string(op, oprkind, arg1, arg2)), errhint("Could not choose a best candidate operator. " *************** *** 758,763 **** --- 760,766 ---- else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), + /* translator: %s is something like "integer + integer" */ errmsg("operator does not exist: %s", op_signature_string(op, oprkind, arg1, arg2)), errhint("No operator matches the given name and argument type(s). "