Re: proposal \gcsv

Поиск
Список
Период
Сортировка
От Erik Rijkers
Тема Re: proposal \gcsv
Дата
Msg-id 50f6629d738fa4861c7e29e391fd9569@xs4all.nl
обсуждение исходный текст
Ответ на Re: proposal \gcsv  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal \gcsv  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: proposal \gcsv  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
On 2020-03-26 18:49, Pavel Stehule wrote:
> Hi
> 
> [psql-gfmt.patch]

This seems useful and works well; I haven't found any errors. Well done.

However, I have a suggestion that is perhaps slightly outside of this 
patch but functionally so close that maybe we can discuss it here.

When you try to get a tab-separated output via this new  \gfmt  in a 
one-liner
you're still forced to use
    \pset csv_fieldsep '\t'

Would it be possible to do one of the following to enable a more compact 
one-liner syntax:

1. add an option:
     \gfmt tsv   --> use a TAB instead of a comma in the csv

or

2. let the psql command-line option '--csv' honour the value given by  
psql -F/--field-separator (it does not do so now)

or

3. add an psql -commandline option:
     --csv-field-separator

Any of these three (I'd prefer the first) would make producing a tsv in 
shell one-liners with psql easier/more compact.


Thanks,


Erik Rijkers














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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: plan cache overhead on plpgsql expression
Следующее
От: Andres Freund
Дата:
Сообщение: Re: plan cache overhead on plpgsql expression