summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/float.c
diff options
context:
space:
mode:
authorAlvaro Herrera2017-01-18 19:08:20 +0000
committerAlvaro Herrera2017-01-18 19:08:20 +0000
commit9a34123bc315e55b33038464422ef1cd2b67dab2 (patch)
tree9b1e2e9189e7b60e7eb2876e365c5a950a6aa228 /src/backend/utils/adt/float.c
parent716c7d4b242f0a64ad8ac4dc48c6fed6557ba12c (diff)
Make messages mentioning type names more uniform
This avoids additional translatable strings for each distinct type, as well as making our quoting style around type names more consistent (namely, that we don't quote type names). This continues what started as f402b9950120. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils/adt/float.c')
-rw-r--r--src/backend/utils/adt/float.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 86b46ded88d..894f026a41b 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -241,8 +241,8 @@ float4in(PG_FUNCTION_ARGS)
if (*num == '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for type real: \"%s\"",
- orig_num)));
+ errmsg("invalid input syntax for type %s: \"%s\"",
+ "real", orig_num)));
errno = 0;
val = strtod(num, &endptr);
@@ -315,8 +315,8 @@ float4in(PG_FUNCTION_ARGS)
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for type real: \"%s\"",
- orig_num)));
+ errmsg("invalid input syntax for type %s: \"%s\"",
+ "real", orig_num)));
}
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
else
@@ -339,8 +339,8 @@ float4in(PG_FUNCTION_ARGS)
if (*endptr != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for type real: \"%s\"",
- orig_num)));
+ errmsg("invalid input syntax for type %s: \"%s\"",
+ "real", orig_num)));
/*
* if we get here, we have a legal double, still need to check to see if