Re: csv format for psql

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: csv format for psql
Date: 2018-03-28 20:32:46
Message-ID: CAKFQuwbzfyki+0tBHuXmaYQFX5vBHBOnQ-caNda6i5ssteBT0A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday, March 28, 2018, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:

>
>
> And if we introduce csv-specific fieldsep, then we multiply this wrong
>> design. The fix in this direction is renaming fieldsep to fieldsep-unaliagn
>> - but it is probably too big change too. So this design is nothing what I
>> can mark as good solution.
>>
>
> Good, we somehow agree on something!
>
> I can live with because it is much better than using pipe as separator for
>> csv, and because real impact is small - for almost people it will be
>> invisible - but have not good feeling from it.
>
>
Concretely...I'm in favor of the "\pset fieldsep_csv ," solution and csv
format should always use its existing value. Teach \pset fieldsep to fail
if the current format is csv. Being able to specify the csv fieldsep like
"\pset format csv ;" would be a plus.

Unaligned format could grow its own fieldsep if it wanted to but it can
also just use the default provided fieldsep var whose default value is
pipe. If it did grow one it would need to understand "not set" in order to
preserve existing behavior. We don't have that problem with csv.

I don't believe we can modify fieldsep without causing unwanted grief.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-03-28 21:01:20 Re: [HACKERS] why not parallel seq scan for slow functions
Previous Message Fujii Masao 2018-03-28 20:01:40 Re: Using base backup exclusion filters to reduce data transferred with pg_rewind