]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix translation markers
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 24 Aug 2023 08:24:38 +0000 (10:24 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 24 Aug 2023 08:24:38 +0000 (10:24 +0200)
Conditionals cannot be inside gettext trigger functions, they must be
applied outside.

src/backend/parser/parse_expr.c

index de5732622fe914e15f181370c5d12488c5e11076..5316275b69ca38eb4dd5a05fc70725a512272301 100644 (file)
@@ -3257,9 +3257,9 @@ transformJsonValueExpr(ParseState *pstate, const char *constructName,
                if (exprtype != BYTEAOID && typcategory != TYPCATEGORY_STRING)
                        ereport(ERROR,
                                        errcode(ERRCODE_DATATYPE_MISMATCH),
-                                       errmsg(ve->format->format_type == JS_FORMAT_DEFAULT ?
-                                                  "cannot use non-string types with implicit FORMAT JSON clause" :
-                                                  "cannot use non-string types with explicit FORMAT JSON clause"),
+                                       ve->format->format_type == JS_FORMAT_DEFAULT ?
+                                       errmsg("cannot use non-string types with implicit FORMAT JSON clause") :
+                                       errmsg("cannot use non-string types with explicit FORMAT JSON clause"),
                                        parser_errposition(pstate, ve->format->location >= 0 ?
                                                                           ve->format->location : location));