Re: csv format for psql

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: csv format for psql
Дата
Msg-id alpine.DEB.2.20.1803071958370.6645@lancre
обсуждение исходный текст
Ответ на Re: csv format for psql  (David Fetter <david@fetter.org>)
Ответы Re: csv format for psql  (David Fetter <david@fetter.org>)
Список pgsql-hackers
>>   psql --csv -c 'TABLE foo' > foo.csv
>>
>> With a -c to introduce the command.
>
> This seems pretty specialized.  If we're adding something new, how about
>
>    psql --format=csv -o foo.csv -c 'TABLE foo'
>
> Or we could stick with:
>
>    psql -P format=csv -o foo.csv -c 'TABLE foo'

Currently "-P format=csv" uses the unaligned formating separators, i.e. 
'|' is used. I was suggesting that a special long option could switch 
several variables to some specific values, i.e.

   --csv

Would be equivalent to something like:

   -P format=csv -P fieldsep=, -P recordsep=\n (?) -P tuples_only=on ...

I.e. really generate some csv from the data in just one option, not many.

But this is obviously debatable.

-- 
Fabien.


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: parallel append vs. simple UNION ALL
Следующее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Fix missing spaces in docs