On 31 March 2018 at 04:33, Fabien COELHO <coe...@cri.ensmp.fr> wrote:
> > Bonjour Daniel, > > For csv, Fabien and Peter expressed the opinion that we shouldn't >> create another fieldsep-like variable specifically for it, but instead >> reuse fieldsep. That's what my latest patch does. >> >> Now it turns out that sharing fieldsep comes with some problems. >> > > Personnaly I do not have any problem with CSV defaulting to '|' separator, > given that anyway people often use anything but a comma for the purpose, > including '|'. > > However Pavel wants to block the patch on this point. Too bad. > OK, mostly trying to avoid commenting because I doubt I have much to add. But. If I ask for CSV and don't specify any overrides, I expect to get "C"omma separated values, not some other character. More specifically, if I say --csv I expect to get files that are identical with what I would get if I used COPY ... CSV. Actually, COPY ... CSV HEADER, given that psql shows column headings. This also implies that I expect the quoting and related details that are associated with CSV. And I don't think I'm a weird user. If --csv does anything even a little different from a simple COPY invocation on the same query, at some point it's going to bite somebody and they will rightfully curse the design decisions taken in this thread.