From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Daniel Verite <daniel(at)manitou-mail(dot)org> |
Cc: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: csv format for psql |
Date: | 2018-03-01 16:15:18 |
Message-ID: | CAFj8pRBWhvo6OHU4ZVbWT-YNJ-HMVUoQ-CiwT3Lujd3LbcXo=g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2018-03-01 17:10 GMT+01:00 Daniel Verite <daniel(at)manitou-mail(dot)org>:
> Fabien COELHO wrote:
>
> > Maybe some \csv command could set the format to csv, fieldsep to ",",
> > tuples_only to on, recordsep to '\n'? Not sure whether it would be
> > acceptable, though, and how to turn it off once turned on... Probably an
> > average (aka not good) idea:-)
>
> Thanks for reviewing this patch!
>
> Attached is a v2 fixing the bugs you mentioned, and adding ---csv/-C
> as discussed upthread. I'll add some regression tests shortly.
>
> About the default separator, the approach taken by this patch is that
> the csv output is equivalent to unaligned with csv quoting, so it has
> the same behavior and follows the options of the unaligned mode
> as much as possible.
>
> That seemed like a good idea to me when I wrote it, but maybe
> a better idea would to have a new \pset fieldsep_csv
> parameter with its own command-line option, and ignore {fieldsep,
> fieldsep_zero, recordsep, recordsep_zero} for this format, just like
> they are being ignored for HTML, or latex, or asciidoc...
> Does anyone who think that csv should be added care
> about this "alignment" with unaligned? :)
>
good idea
Pavel
>
>
> Best regards,
> --
> Daniel Vérité
> PostgreSQL-powered mailer: http://www.manitou-mail.org
> Twitter: @DanielVerite
>
From | Date | Subject | |
---|---|---|---|
Next Message | Curt Tilmes | 2018-03-01 16:36:01 | Re: [PATCH] Find additional connection service files in pg_service.conf.d directory |
Previous Message | Nikita Glukhov | 2018-03-01 16:11:05 | Re: [PATCH][PROPOSAL] Add enum releation option type |