@@ -3561,11 +3561,9 @@ makeJsonConstructorExpr(ParseState *pstate, JsonConstructorType type,
35613561/*
35623562 * Transform JSON_OBJECT() constructor.
35633563 *
3564- * JSON_OBJECT() is transformed into json[b]_build_object[_ext]() call
3565- * depending on the output JSON format. The first two arguments of
3566- * json[b]_build_object_ext() are absent_on_null and check_unique.
3567- *
3568- * Then function call result is coerced to the target type.
3564+ * JSON_OBJECT() is transformed into a JsonConstructorExpr node of type
3565+ * JSCTOR_JSON_OBJECT. The result is coerced to the target type given
3566+ * by ctor->output.
35693567 */
35703568static Node *
35713569transformJsonObjectConstructor (ParseState * pstate ,JsonObjectConstructor * ctor )
@@ -3753,10 +3751,11 @@ transformJsonAggConstructor(ParseState *pstate, JsonAggConstructor *agg_ctor,
37533751/*
37543752 * Transform JSON_OBJECTAGG() aggregate function.
37553753 *
3756- * JSON_OBJECTAGG() is transformed into
3757- * json[b]_objectagg[_unique][_strict](key, value) call depending on
3758- * the output JSON format. Then the function call result is coerced to the
3759- * target output type.
3754+ * JSON_OBJECT() is transformed into a JsonConstructorExpr node of type
3755+ * JSCTOR_JSON_OBJECTAGG, which at runtime becomes a
3756+ * json[b]_object_agg[_unique][_strict](agg->arg->key, agg->arg->value) call
3757+ * depending on the output JSON format. The result is coerced to the target
3758+ * type given by agg->constructor->output.
37603759 */
37613760static Node *
37623761transformJsonObjectAgg (ParseState * pstate ,JsonObjectAgg * agg )
@@ -3815,9 +3814,11 @@ transformJsonObjectAgg(ParseState *pstate, JsonObjectAgg *agg)
38153814/*
38163815 * Transform JSON_ARRAYAGG() aggregate function.
38173816 *
3818- * JSON_ARRAYAGG() is transformed into json[b]_agg[_strict]() call depending
3819- * on the output JSON format and absent_on_null. Then the function call result
3820- * is coerced to the target output type.
3817+ * JSON_ARRAYAGG() is transformed into a JsonConstructorExpr node of type
3818+ * JSCTOR_JSON_ARRAYAGG, which at runtime becomes a
3819+ * json[b]_object_agg[_unique][_strict](agg->arg) call depending on the output
3820+ * JSON format. The result is coerced to the target type given by
3821+ * agg->constructor->output.
38213822 */
38223823static Node *
38233824transformJsonArrayAgg (ParseState * pstate ,JsonArrayAgg * agg )
@@ -3854,11 +3855,9 @@ transformJsonArrayAgg(ParseState *pstate, JsonArrayAgg *agg)
38543855/*
38553856 * Transform JSON_ARRAY() constructor.
38563857 *
3857- * JSON_ARRAY() is transformed into json[b]_build_array[_ext]() call
3858- * depending on the output JSON format. The first argument of
3859- * json[b]_build_array_ext() is absent_on_null.
3860- *
3861- * Then function call result is coerced to the target type.
3858+ * JSON_ARRAY() is transformed into a JsonConstructorExpr node of type
3859+ * JSCTOR_JSON_ARRAY. The result is coerced to the target type given
3860+ * by ctor->output.
38623861 */
38633862static Node *
38643863transformJsonArrayConstructor (ParseState * pstate ,JsonArrayConstructor * ctor )