From 330e886f7991345c4d2ee697e0f14bcf5e846d38 Mon Sep 17 00:00:00 2001 From: naisila Date: Sun, 10 Nov 2024 23:49:22 +0300 Subject: [PATCH] Ruleutils_17 SQL/JSON: Fix default ON ERROR behavior for JSON_TABLE Relevant PG commit: https://github.com/postgres/postgres/commit/5067c230b8ee42a01cc77dc5745bc3a78f393af3 5067c230b8ee42a01cc77dc5745bc3a78f393af3 --- src/backend/distributed/deparser/ruleutils_17.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/distributed/deparser/ruleutils_17.c b/src/backend/distributed/deparser/ruleutils_17.c index bedf616a1..f0710e684 100644 --- a/src/backend/distributed/deparser/ruleutils_17.c +++ b/src/backend/distributed/deparser/ruleutils_17.c @@ -8651,7 +8651,7 @@ get_json_table(TableFunc *tf, deparse_context *context, bool showimplicit) get_json_table_columns(tf, castNode(JsonTablePathScan, tf->plan), context, showimplicit); - if (jexpr->on_error->btype != JSON_BEHAVIOR_EMPTY) + if (jexpr->on_error->btype != JSON_BEHAVIOR_EMPTY_ARRAY) get_json_behavior(jexpr->on_error, context, "ERROR"); if (PRETTY_INDENT(context))