aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/regexp.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-05-16 18:50:56 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-05-16 19:14:31 -0400
commit75445c1515fffa581585f1b72e5b5314c1c395ce (patch)
tree7a1308156552e6f5126e12c679457d8825de42c7 /src/backend/utils/adt/regexp.c
parent3f58cc6dd8fc821992da7ed8099d283b014fc2dc (diff)
downloadpostgresql-75445c1515fffa581585f1b72e5b5314c1c395ce.tar.gz
postgresql-75445c1515fffa581585f1b72e5b5314c1c395ce.zip
More message style fixes
Discussion: https://postgr.es/m/20190515183005.GA26486@alvherre.pgsql
Diffstat (limited to 'src/backend/utils/adt/regexp.c')
-rw-r--r--src/backend/utils/adt/regexp.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c
index ab44846e0b3..c5be472bced 100644
--- a/src/backend/utils/adt/regexp.c
+++ b/src/backend/utils/adt/regexp.c
@@ -423,7 +423,7 @@ parse_re_flags(pg_re_flags *flags, text *opts)
default:
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid regexp option: \"%c\"",
+ errmsg("invalid regular expression option: \"%c\"",
opt_p[i])));
break;
}
@@ -920,7 +920,9 @@ regexp_match(PG_FUNCTION_ARGS)
if (re_flags.glob)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("regexp_match does not support the global option"),
+ /* translator: %s is a SQL function name */
+ errmsg("%s does not support the \"global\" option",
+ "regexp_match()"),
errhint("Use the regexp_matches function instead.")));
matchctx = setup_regexp_matches(orig_str, pattern, &re_flags,
@@ -1298,7 +1300,9 @@ regexp_split_to_table(PG_FUNCTION_ARGS)
if (re_flags.glob)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("regexp_split_to_table does not support the global option")));
+ /* translator: %s is a SQL function name */
+ errmsg("%s does not support the \"global\" option",
+ "regexp_split_to_table()")));
/* But we find all the matches anyway */
re_flags.glob = true;
@@ -1351,7 +1355,9 @@ regexp_split_to_array(PG_FUNCTION_ARGS)
if (re_flags.glob)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("regexp_split_to_array does not support the global option")));
+ /* translator: %s is a SQL function name */
+ errmsg("%s does not support the \"global\" option",
+ "regexp_split_to_array()")));
/* But we find all the matches anyway */
re_flags.glob = true;