@@ -3709,11 +3709,9 @@ makeJsonConstructorExpr(ParseState *pstate, JsonConstructorType type,
3709
3709
/*
3710
3710
* Transform JSON_OBJECT() constructor.
3711
3711
*
3712
- * JSON_OBJECT() is transformed into json[b]_build_object[_ext]() call
3713
- * depending on the output JSON format. The first two arguments of
3714
- * json[b]_build_object_ext() are absent_on_null and check_unique.
3715
- *
3716
- * Then function call result is coerced to the target type.
3712
+ * JSON_OBJECT() is transformed into a JsonConstructorExpr node of type
3713
+ * JSCTOR_JSON_OBJECT. The result is coerced to the target type given
3714
+ * by ctor->output.
3717
3715
*/
3718
3716
static Node *
3719
3717
transformJsonObjectConstructor (ParseState * pstate , JsonObjectConstructor * ctor )
@@ -3903,10 +3901,11 @@ transformJsonAggConstructor(ParseState *pstate, JsonAggConstructor *agg_ctor,
3903
3901
/*
3904
3902
* Transform JSON_OBJECTAGG() aggregate function.
3905
3903
*
3906
- * JSON_OBJECTAGG() is transformed into
3907
- * json[b]_objectagg[_unique][_strict](key, value) call depending on
3908
- * the output JSON format. Then the function call result is coerced to the
3909
- * target output type.
3904
+ * JSON_OBJECT() is transformed into a JsonConstructorExpr node of type
3905
+ * JSCTOR_JSON_OBJECTAGG, which at runtime becomes a
3906
+ * json[b]_object_agg[_unique][_strict](agg->arg->key, agg->arg->value) call
3907
+ * depending on the output JSON format. The result is coerced to the target
3908
+ * type given by agg->constructor->output.
3910
3909
*/
3911
3910
static Node *
3912
3911
transformJsonObjectAgg (ParseState * pstate , JsonObjectAgg * agg )
@@ -3966,9 +3965,11 @@ transformJsonObjectAgg(ParseState *pstate, JsonObjectAgg *agg)
3966
3965
/*
3967
3966
* Transform JSON_ARRAYAGG() aggregate function.
3968
3967
*
3969
- * JSON_ARRAYAGG() is transformed into json[b]_agg[_strict]() call depending
3970
- * on the output JSON format and absent_on_null. Then the function call result
3971
- * is coerced to the target output type.
3968
+ * JSON_ARRAYAGG() is transformed into a JsonConstructorExpr node of type
3969
+ * JSCTOR_JSON_ARRAYAGG, which at runtime becomes a
3970
+ * json[b]_object_agg[_unique][_strict](agg->arg) call depending on the output
3971
+ * JSON format. The result is coerced to the target type given by
3972
+ * agg->constructor->output.
3972
3973
*/
3973
3974
static Node *
3974
3975
transformJsonArrayAgg (ParseState * pstate , JsonArrayAgg * agg )
@@ -4004,11 +4005,9 @@ transformJsonArrayAgg(ParseState *pstate, JsonArrayAgg *agg)
4004
4005
/*
4005
4006
* Transform JSON_ARRAY() constructor.
4006
4007
*
4007
- * JSON_ARRAY() is transformed into json[b]_build_array[_ext]() call
4008
- * depending on the output JSON format. The first argument of
4009
- * json[b]_build_array_ext() is absent_on_null.
4010
- *
4011
- * Then function call result is coerced to the target type.
4008
+ * JSON_ARRAY() is transformed into a JsonConstructorExpr node of type
4009
+ * JSCTOR_JSON_ARRAY. The result is coerced to the target type given
4010
+ * by ctor->output.
4012
4011
*/
4013
4012
static Node *
4014
4013
transformJsonArrayConstructor (ParseState * pstate , JsonArrayConstructor * ctor )
0 commit comments