|
8 | 8 | * |
9 | 9 | * |
10 | 10 | * IDENTIFICATION |
11 | | - * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.112 2004/12/31 22:01:21 pgsql Exp $ |
| 11 | + * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.113 2005/02/11 04:08:58 neilc Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -267,21 +267,12 @@ float4in(PG_FUNCTION_ARGS) |
267 | 267 | /* |
268 | 268 | * Check for an empty-string input to begin with, to avoid the |
269 | 269 | * vagaries of strtod() on different platforms. |
270 | | - * |
271 | | - * In releases prior to 8.0, we accepted an empty string as valid input |
272 | | - * (yielding a float4 of 0). In 8.0, we accept empty strings, but emit |
273 | | - * a warning noting that the feature is deprecated. In 8.1+, the |
274 | | - * warning should be replaced by an error. |
275 | 270 | */ |
276 | 271 | if (*num=='\0') |
277 | | -{ |
278 | | -ereport(WARNING, |
279 | | -(errcode(ERRCODE_WARNING_DEPRECATED_FEATURE), |
280 | | -errmsg("deprecated input syntax for type real: \"\""), |
281 | | -errdetail("This input will be rejected in " |
282 | | -"a future release of PostgreSQL."))); |
283 | | -PG_RETURN_FLOAT4((float4)0.0); |
284 | | -} |
| 272 | +ereport(ERROR, |
| 273 | +(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), |
| 274 | +errmsg("invalid input syntax for type real: \"%s\"", |
| 275 | +orig_num))); |
285 | 276 |
|
286 | 277 | /* skip leading whitespace */ |
287 | 278 | while (*num!='\0'&&isspace((unsignedchar)*num)) |
@@ -444,21 +435,12 @@ float8in(PG_FUNCTION_ARGS) |
444 | 435 | /* |
445 | 436 | * Check for an empty-string input to begin with, to avoid the |
446 | 437 | * vagaries of strtod() on different platforms. |
447 | | - * |
448 | | - * In releases prior to 8.0, we accepted an empty string as valid input |
449 | | - * (yielding a float8 of 0). In 8.0, we accept empty strings, but emit |
450 | | - * a warning noting that the feature is deprecated. In 8.1+, the |
451 | | - * warning should be replaced by an error. |
452 | 438 | */ |
453 | 439 | if (*num=='\0') |
454 | | -{ |
455 | | -ereport(WARNING, |
456 | | -(errcode(ERRCODE_WARNING_DEPRECATED_FEATURE), |
457 | | -errmsg("deprecated input syntax for type double precision: \"\""), |
458 | | -errdetail("This input will be rejected in " |
459 | | -"a future release of PostgreSQL."))); |
460 | | -PG_RETURN_FLOAT8(0.0); |
461 | | -} |
| 440 | +ereport(ERROR, |
| 441 | +(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), |
| 442 | +errmsg("invalid input syntax for type double precision: \"%s\"", |
| 443 | +orig_num))); |
462 | 444 |
|
463 | 445 | /* skip leading whitespace */ |
464 | 446 | while (*num!='\0'&&isspace((unsignedchar)*num)) |
|