@@ -3709,11 +3709,9 @@ makeJsonConstructorExpr(ParseState *pstate, JsonConstructorType type,
37093709/*
37103710 * Transform JSON_OBJECT() constructor.
37113711 *
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.
37173715 */
37183716static Node *
37193717transformJsonObjectConstructor (ParseState * pstate , JsonObjectConstructor * ctor )
@@ -3903,10 +3901,11 @@ transformJsonAggConstructor(ParseState *pstate, JsonAggConstructor *agg_ctor,
39033901/*
39043902 * Transform JSON_OBJECTAGG() aggregate function.
39053903 *
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.
39103909 */
39113910static Node *
39123911transformJsonObjectAgg (ParseState * pstate , JsonObjectAgg * agg )
@@ -3966,9 +3965,11 @@ transformJsonObjectAgg(ParseState *pstate, JsonObjectAgg *agg)
39663965/*
39673966 * Transform JSON_ARRAYAGG() aggregate function.
39683967 *
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.
39723973 */
39733974static Node *
39743975transformJsonArrayAgg (ParseState * pstate , JsonArrayAgg * agg )
@@ -4004,11 +4005,9 @@ transformJsonArrayAgg(ParseState *pstate, JsonArrayAgg *agg)
40044005/*
40054006 * Transform JSON_ARRAY() constructor.
40064007 *
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.
40124011 */
40134012static Node *
40144013transformJsonArrayConstructor (ParseState * pstate , JsonArrayConstructor * ctor )
0 commit comments