No quotes in output of "psql \copy CSV"

Поиск
Список
Период
Сортировка
От Arnaud Lesauvage
Тема No quotes in output of "psql \copy CSV"
Дата
Msg-id 4C29E5E0.9040508@codata.eu
обсуждение исходный текст
Ответы Re: No quotes in output of "psql \copy CSV"  (Sam Mason <sam@samason.me.uk>)
Список pgsql-general
Hi all,

I'd like to generate CSV files from the output of a query.
The files must be generated on the client, so I was planning on using
psql \copy command.
I can't get the srings in the output to be quoted though. I thought that
this was the default for CSV, and even adding the "QUOTE" parameter does
not help :

postgres=# \copy (SELECT 1, 'test', 'foo', 'bar', TRUE, FALSE) TO stdout
CSV QUOTE '"' DELIMITER ','
1,test,foo,bar,t,f

postgres=# \copy (SELECT 1, 'test', 'foo', 'bar', TRUE, FALSE) TO stdout CSV
1,test,foo,bar,t,f


What am I missing here ?

Thanks for your help !
Regards
--
Arnaud Lesauvage

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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: alter table schema, default sequences stay the same
Следующее
От: Sam Mason
Дата:
Сообщение: Re: No quotes in output of "psql \copy CSV"