Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtins: array_to_string should traverse nested arrays
Fixes #95588 In Postgres, `array_to_string` traverses nested arrays and prints their contents. In CRDB, the nested array structures are printed out. For example, `SELECT array_to_string(ARRAY[ARRAY[ARRAY[5,6], ARRAY[2,3]]], ' ');` CRDB Result: `ARRAY[ARRAY[5:::INT8,6:::INT8],ARRAY[2:::INT8,3:::INT8]]` Postgres Result: `5 6 2 3` This fix brings the behavior of `array_to_string` in line with Postgres, and avoids printing the nested ARRAY structures. Some tools like GoldenGate rely on Postgres-compatible behavior of `array_to_string` for proper functioning. Release note (bug fix): This patch fixes the array_to_string built-in function so that nested arrays are traversed without printing 'ARRAY' at each nesting level.
- Loading branch information