+0.5 for the reasons already stated; but I get and accept the argument for NULL.
I will reiterate my preference for writing an explicit IS NULL branch in the case expression instead of relying upon the strict-ness of array_to_string.
+ "CASE\n"
WHEN %s IS NULL THEN NULL
+ " WHEN pg_catalog.cardinality(%s) = 0 THEN '%s'\n" + " ELSE pg_catalog.array_to_string(%s, E'\\n')\n" + "END AS \"%s\"",