aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/complex.c
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2018-07-22 14:58:01 -0700
committerAndres Freund <andres@anarazel.de>2018-07-22 14:58:01 -0700
commit3522d0eaba5a976f09a48810dd25dff6ab3565df (patch)
tree15b29dcc7a13a0b03e2f195d3004047f61a1e56d /src/tutorial/complex.c
parent04269320aed30d3e37c10ae77775954eae234d45 (diff)
downloadpostgresql-3522d0eaba5a976f09a48810dd25dff6ab3565df.tar.gz
postgresql-3522d0eaba5a976f09a48810dd25dff6ab3565df.zip
Deduplicate "invalid input syntax" messages for various types.
Previously a lot of the error messages referenced the type in the error message itself. That requires that the message is translated separately for each type. Note that currently a few smallint cases continue to reference the integer, rather than smallint, type. A later patch will create a separate routine for 16bit input. Author: Andres Freund Discussion: https://postgr.es/m/20180707200158.wpqkd7rjr4jxq5g7@alap3.anarazel.de
Diffstat (limited to 'src/tutorial/complex.c')
-rw-r--r--src/tutorial/complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tutorial/complex.c b/src/tutorial/complex.c
index 1b5ebc2ff04..6798a9e6ba6 100644
--- a/src/tutorial/complex.c
+++ b/src/tutorial/complex.c
@@ -38,8 +38,8 @@ complex_in(PG_FUNCTION_ARGS)
if (sscanf(str, " ( %lf , %lf )", &x, &y) != 2)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for complex: \"%s\"",
- str)));
+ errmsg("invalid input syntax for type %s: \"%s\"",
+ "complex", str)));
result = (Complex *) palloc(sizeof(Complex));
result->x = x;