Search Postgresql Archives

No quotes in output of "psql \copy CSV"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux