minor_fix_v38.diff
application/x-patch
Filename: minor_fix_v38.diff
Type: application/x-patch
Part: 0
Message:
Re: remaining sql/json patches
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v38
| File | + | − |
|---|---|---|
| src/backend/executor/execExpr.c | 1 | 1 |
| src/backend/parser/parse_expr.c | 1 | 0 |
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 74bc6f49..56ab12ac 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -4289,7 +4289,7 @@ ExecInitJsonExpr(JsonExpr *jexpr, ExprState *state,
* nodes.
*/
jsestate->escontext.type = T_ErrorSaveContext;
- if (jexpr->result_coercion || jexpr->omit_quotes)
+ if (jexpr->result_coercion)
{
jsestate->jump_eval_result_coercion =
ExecInitJsonExprCoercion(state, jexpr->result_coercion,
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index 31c0847e..9802b4ae 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -4363,6 +4363,7 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func)
jsexpr->returning->format->format_type = JS_FORMAT_DEFAULT;
jsexpr->returning->format->encoding = JS_ENC_DEFAULT;
+ jsexpr->omit_quotes = true;
jsexpr->result_coercion = coerceJsonFuncExprOutput(pstate, jsexpr);
/*