From 75445c1515fffa581585f1b72e5b5314c1c395ce Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Thu, 16 May 2019 18:50:56 -0400 Subject: More message style fixes Discussion: https://postgr.es/m/20190515183005.GA26486@alvherre.pgsql --- src/backend/utils/adt/regexp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/adt/regexp.c') 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; -- cgit v1.2.3