Re: csv format for psql

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: csv format for psql
Дата
Msg-id 20181107082355.GG1677@paquier.xyz
обсуждение исходный текст
Ответ на Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: csv format for psql  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: csv format for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Higuchi, Daisuke"
Дата:
Сообщение: RE: [Bug Fix]ECPG: cancellation of significant digits on ECPG
Следующее
От: "Kato, Sho"
Дата:
Сообщение: RE: Performance improvements of INSERTs to a partitioned table