From 1e6dfdaa04399a531789660864648919be071686 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 4 Nov 2025 11:59:17 +0100 Subject: [PATCH] Error message stylistic correction Fixup for commit ef5e60a9d35: The inconsistent use of articles was a bit awkward. --- src/backend/parser/parse_expr.c | 2 +- src/test/regress/expected/collate.icu.utf8.out | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index c8a9ccd6ed0..b27e597799b 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -4760,7 +4760,7 @@ transformJsonBehavior(ParseState *pstate, JsonExpr *jsexpr, targetcoll != exprcoll) ereport(ERROR, errcode(ERRCODE_COLLATION_MISMATCH), - errmsg("the collation of DEFAULT expression conflicts with RETURNING clause"), + errmsg("collation of DEFAULT expression conflicts with RETURNING clause"), errdetail("\"%s\" versus \"%s\"", get_collation_name(exprcoll), get_collation_name(targetcoll)), diff --git a/src/test/regress/expected/collate.icu.utf8.out b/src/test/regress/expected/collate.icu.utf8.out index 60e15a437e4..2360fcac90f 100644 --- a/src/test/regress/expected/collate.icu.utf8.out +++ b/src/test/regress/expected/collate.icu.utf8.out @@ -2277,12 +2277,12 @@ SELECT JSON_VALUE('{"a": "A"}', '$.a' RETURNING d1 DEFAULT 'C' ON EMPTY) = 'a'; (1 row) SELECT JSON_VALUE('{"a": "A"}', '$.a' RETURNING d1 DEFAULT 'C'::d2 ON EMPTY) = 'a'; -- error -ERROR: the collation of DEFAULT expression conflicts with RETURNING clause +ERROR: collation of DEFAULT expression conflicts with RETURNING clause LINE 1: ...ON_VALUE('{"a": "A"}', '$.a' RETURNING d1 DEFAULT 'C'::d2 ON... ^ DETAIL: "C" versus "case_insensitive" SELECT JSON_VALUE('{"a": "A"}', '$.a' RETURNING d1 DEFAULT 'C' COLLATE "C" ON EMPTY) = 'a'; -- error -ERROR: the collation of DEFAULT expression conflicts with RETURNING clause +ERROR: collation of DEFAULT expression conflicts with RETURNING clause LINE 1: ...ON_VALUE('{"a": "A"}', '$.a' RETURNING d1 DEFAULT 'C' COLLAT... ^ DETAIL: "C" versus "case_insensitive" @@ -2299,12 +2299,12 @@ SELECT JSON_VALUE('{"a": "A"}', '$.c' RETURNING d1 DEFAULT 'A' COLLATE case_inse (1 row) SELECT JSON_VALUE('{"a": "A"}', '$.c' RETURNING d1 DEFAULT 'A'::d2 ON EMPTY) = 'a'; -- error -ERROR: the collation of DEFAULT expression conflicts with RETURNING clause +ERROR: collation of DEFAULT expression conflicts with RETURNING clause LINE 1: ...ON_VALUE('{"a": "A"}', '$.c' RETURNING d1 DEFAULT 'A'::d2 ON... ^ DETAIL: "C" versus "case_insensitive" SELECT JSON_VALUE('{"a": "A"}', '$.c' RETURNING d1 DEFAULT 'A' COLLATE "C" ON EMPTY) = 'a'; -- error -ERROR: the collation of DEFAULT expression conflicts with RETURNING clause +ERROR: collation of DEFAULT expression conflicts with RETURNING clause LINE 1: ...ON_VALUE('{"a": "A"}', '$.c' RETURNING d1 DEFAULT 'A' COLLAT... ^ DETAIL: "C" versus "case_insensitive" -- 2.39.5