diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-04-14 10:26:29 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-04-14 10:26:29 -0400 |
commit | 4cd8717af3f0345c758d46fea06fb390b4d593f2 (patch) | |
tree | fc0bbe5b2bedcb83729fb1a4ddf8bdb7381ce57b /src/backend/parser/parse_expr.c | |
parent | fcdb35c32ac70a113c134a66daf9ba28523ff32b (diff) | |
download | postgresql-4cd8717af3f0345c758d46fea06fb390b4d593f2.tar.gz postgresql-4cd8717af3f0345c758d46fea06fb390b4d593f2.zip |
Improve a couple of sql/json error messages
Fix the grammar in two, and add a hint to one.
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 2f8c5e63fe8..5fc0b1763c8 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -4456,7 +4456,7 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func) if (jsexpr->returning->typid != JSONBOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("JSON_TABLE() is not yet implemented for json type"), + errmsg("JSON_TABLE() is not yet implemented for the json type"), errhint("Try casting the argument to jsonb"), parser_errposition(pstate, func->location))); @@ -4466,7 +4466,8 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func) if (exprType(contextItemExpr) != JSONBOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("%s() is not yet implemented for json type", func_name), + errmsg("%s() is not yet implemented for the json type", func_name), + errhint("Try casting the argument to jsonb"), parser_errposition(pstate, func->location))); return (Node *) jsexpr; |