aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-08-18 07:41:14 +0200
committerPeter Eisentraut <peter@eisentraut.org>2023-08-18 07:41:14 +0200
commit881cd9e581c2c40023f82edcd1cd2335691b78f2 (patch)
treeab1a8f7cf31793f75e72be99e40ebd79b30a0602 /src/backend/parser/parse_expr.c
parent249d74394500e0830d45769423fe8aac7012537c (diff)
downloadpostgresql-881cd9e581c2c40023f82edcd1cd2335691b78f2.tar.gz
postgresql-881cd9e581c2c40023f82edcd1cd2335691b78f2.zip
Remove dubious warning message from SQL/JSON functions
There was a warning that FORMAT JSON has no effect on json/jsonb types, which is true, but it's not clear why we should issue a warning about it. The SQL standard does not say anything about this, which should generally govern the behavior here. So remove it. Discussion: https://www.postgresql.org/message-id/flat/dfec2cae-d17e-c508-6d16-c2dba82db486%40eisentraut.org
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index fed8e4d0897..aa726651a6e 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -3257,12 +3257,7 @@ transformJsonValueExpr(ParseState *pstate, const char *constructName,
parser_errposition(pstate, ve->format->location));
if (exprtype == JSONOID || exprtype == JSONBOID)
- {
format = JS_FORMAT_DEFAULT; /* do not format json[b] types */
- ereport(WARNING,
- errmsg("FORMAT JSON has no effect for json and jsonb types"),
- parser_errposition(pstate, ve->format->location));
- }
else
format = ve->format->format_type;
}