Search Postgresql Archives

Re: generate CSV with Copy+Quotes - Postgres 9.2

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

 






Perhaps you mean you want to quote of all strings? For that you use FORCE QUOTE.
eg:
    COPY (SELECT
            name_first
            name_last,
            email,
            company
    FROM
            clients
    )
    TO '/var/lib/pgsql/test1.csv' DELIMITER ','
     csv HEADER QUOTE '"';
     FORCE QUOTE name_first, name_last, email, company;

Please RTFM
--  
 


Thanks! FORCE QUOTE was exactly what I needed.

Patrick. 


[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