From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
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-11-07 08:23:55 |
Message-ID: | 20181107082355.GG1677@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 06, 2018 at 02:57:15PM +0100, Daniel Verite wrote:
> Here's a rebased version following these changes.
Thanks for doing a rebase.
First, it seems to me that it is necessary to overcomplicate the
interface of psql for that. Most of the other formats don't have their
own switch, and it is perfectly possible to use CSV format with just
--pset=format=csv. -C could also be useful for other things, say
compression.
Not reusing fieldsep and creating a new variable looks like the correct
way to go, as there is no need to bother about cross-option checks if
the format is moved from unaligned to csv and the other way around,
especially as the delimiter of CSV needs cannot be larger than
one-byte.
+ pset.popt.topt.fieldSepCsv = pg_strdup(",");
Let's store that in a variable instead of hardcoding it.
In the regression tests, "col 9" is wanted with a newline?
I am still digging into the details of this patch, and I am
unfortunately running out of fuel for the day.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Kato, Sho | 2018-11-07 08:31:29 | RE: Performance improvements of INSERTs to a partitioned table |
Previous Message | Higuchi, Daisuke | 2018-11-07 08:22:34 | RE: [Bug Fix]ECPG: cancellation of significant digits on ECPG |