How do I display rows as CSV?
You can copy a query results directly into a CSV file, e.g.

copy (
    select id, field1 
    from (
        values (1, 'val1'), (2, 'val2')
        ) as v(id, field1)
) to '/data/test.csv' (format csv, header);


The file /data/test.csv:

id,field1
1,val1
2,val2




Use the function concat_ws() to get an output in expected format. Base types will be automatically converted to texts:

select concat_ws(', ', id, field1, date1, dec1)
from (
    values 
        (1::int, 'val1', '2017-01-01'::date, 1.1::dec), 
        (2::int, 'val2', '2017-01-02'::date, 1.2::dec)
    ) as v(id, field1, date1, dec1)

        concat_ws         
--------------------------
 1, val1, 2017-01-01, 1.1
 2, val2, 2017-01-02, 1.2
(2 rows)