648{
649 int i;
650 const char *sep;
651
652 Assert(dim < ndims);
653
654 sep = use_line_feeds ? ",\n " : ",";
655
656 appendStringInfoChar(
result,
'[');
657
658 for (i = 1; i <= dims[dim]; i++)
659 {
660 if (i > 1)
661 appendStringInfoString(
result, sep);
662
663 if (dim + 1 == ndims)
664 {
666 outfuncoid, false);
667 (*valcount)++;
668 }
669 else
670 {
671
672
673
674
676 valcount, tcategory, outfuncoid, false);
677 }
678 }
679
680 appendStringInfoChar(
result,
']');
681}
char result[OUT_DOUBLE_BUFFER_SIZE]
static void array_dim_to_json(StringInfo result, int dim, int ndims, int *dims, Datum *vals, bool *nulls, int *valcount, JsonTypeCategory tcategory, Oid outfuncoid, bool use_line_feeds)
static void datum_to_json(Datum val, bool is_null, StringInfo result, JsonTypeCategory tcategory, Oid outfuncoid, bool key_scalar)