@@ -3561,11 +3561,9 @@ makeJsonConstructorExpr(ParseState *pstate, JsonConstructorType type,
3561
3561
/*
3562
3562
* Transform JSON_OBJECT() constructor.
3563
3563
*
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.
3569
3567
*/
3570
3568
static Node *
3571
3569
transformJsonObjectConstructor (ParseState * pstate ,JsonObjectConstructor * ctor )
@@ -3753,10 +3751,11 @@ transformJsonAggConstructor(ParseState *pstate, JsonAggConstructor *agg_ctor,
3753
3751
/*
3754
3752
* Transform JSON_OBJECTAGG() aggregate function.
3755
3753
*
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.
3760
3759
*/
3761
3760
static Node *
3762
3761
transformJsonObjectAgg (ParseState * pstate ,JsonObjectAgg * agg )
@@ -3815,9 +3814,11 @@ transformJsonObjectAgg(ParseState *pstate, JsonObjectAgg *agg)
3815
3814
/*
3816
3815
* Transform JSON_ARRAYAGG() aggregate function.
3817
3816
*
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.
3821
3822
*/
3822
3823
static Node *
3823
3824
transformJsonArrayAgg (ParseState * pstate ,JsonArrayAgg * agg )
@@ -3854,11 +3855,9 @@ transformJsonArrayAgg(ParseState *pstate, JsonArrayAgg *agg)
3854
3855
/*
3855
3856
* Transform JSON_ARRAY() constructor.
3856
3857
*
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.
3862
3861
*/
3863
3862
static Node *
3864
3863
transformJsonArrayConstructor (ParseState * pstate ,JsonArrayConstructor * ctor )