Re: csv format for psql - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: csv format for psql
Date
Msg-id CAFj8pRAEnsvExWR+yfzPQdCa3HcjiaR9ppO3UDOwuOgXXDkvJA@mail.gmail.com
Whole thread Raw
In response to Re: csv format for psql  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers


2018-03-09 8:40 GMT+01:00 Fabien COELHO <coelho@cri.ensmp.fr>:

About "fieldsep_csv", I do not like much the principle of having different output variables to represent the same concept depending on the format. I would rather have reused fieldsep as in your previous submission and set it to "," when under --csv.

yes


how will be possible to set different separator ';'? I don't see it with
described design

Indeed, it should be possible. I think that the following should be made to work:

  psql --csv -P fieldsep=; -c 'TABLE foo' > foo.csv

So that it can be changed the semi-colon (or tab or whatever) style if required.

ok, then all is ok

Regards

Pavel

--
Fabien.

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions
Next
From: Emre Hasegeli
Date:
Subject: Re: Precision loss casting float to numeric