Re: csv format for psql

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Daniel Verite <daniel(at)manitou-mail(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: csv format for psql
Date: 2018-03-09 04:23:15
Message-ID: CAFj8pRDHC3+MMSh=pwDr9zaB4Yroh=x1Lnn8qbhDqW73TskL-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2018-03-09 3:13 GMT+01:00 Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com
>:

> On 3/8/18 05:05, Fabien COELHO wrote:
> > I'm in favor of having a simple psql way to generate a convenient and
> > compliant CSV output for export/import.
>
> yes
>
> > I also think that a short option brings little value, and "--csv" is good
> > enough for the purpose, so I would agree to remove the "-C" binding.
>
> yes

> > 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

Regards

Pavel

>
> > The "\n" eol style is hardcoded. Should it use "recordsep"?
>
> yes
>
> > The "\pset format" error message in "do_pset" shows values in seemingly
> > random order. The situation is pre-existing but not really satisfactory.
> > I'd suggest to put all values in alphabetical order.
>
> yes
>
> > I'd suggest that tests should include more types, not just strings. I
> > would suggest int, float, timestamp, bytea, an array (which uses , as a
> > separator), json (which uses both " and ,)...
>
> sounds good
>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeremy Finzel 2018-03-09 05:04:20 Re: using worker_spi as pattern
Previous Message Peter Geoghegan 2018-03-09 02:59:30 Re: [HACKERS] MERGE SQL Statement for PG11