Re: [GENERAL] COPY table to file missing quotation marks

2013-02-05 Thread Vick Khera
On Sat, Feb 2, 2013 at 10:03 PM, Jasen Betts ja...@xnet.co.nz wrote: Quotes are optional in csv except for strings containg linebreaks, quotes, or delimiters where they are required. It really depends on whose definition of CSV you use. Please just don't use Excel's output as your

Re: [GENERAL] COPY table to file missing quotation marks

2013-02-03 Thread Jasen Betts
On 2013-01-31, Rich Shepard rshep...@appl-ecosys.com wrote: I'd like to understand what I'm missing when I COPY a table to a .csv file but the text is not quoted. Here's an example of a command: copy chemistry to '/home/postgres/emapchem.csv' with (format CSV, header True, quote '',

[GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Rich Shepard
I'd like to understand what I'm missing when I COPY a table to a .csv file but the text is not quoted. Here's an example of a command: copy chemistry to '/home/postgres/emapchem.csv' with (format CSV, header True, quote '', delimiter '|'); and here're part of the header and following row

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Adrian Klaver
On 01/31/2013 08:37 AM, Rich Shepard wrote: I'd like to understand what I'm missing when I COPY a table to a .csv file but the text is not quoted. Here's an example of a command: copy chemistry to '/home/postgres/emapchem.csv' with (format CSV, header True, quote '', delimiter '|'); and

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Rich Shepard
On Thu, 31 Jan 2013, Adrian Klaver wrote: http://www.postgresql.org/docs/9.2/interactive/sql-copy.html Adrian, I've read this. CSV Format ... The values in each record are separated by the DELIMITER character. If the value contains the delimiter character, the QUOTE character, the NULL

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Steve Crawford
On 01/31/2013 08:46 AM, Adrian Klaver wrote: On 01/31/2013 08:37 AM, Rich Shepard wrote: I'd like to understand what I'm missing when I COPY a table to a .csv file but the text is not quoted. ... http://www.postgresql.org/docs/9.2/interactive/sql-copy.html CSV Format ... The values in

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Rich Shepard
On Thu, 31 Jan 2013, Steve Crawford wrote: Definition of the CSV Format: While there are various specifications and implementations for the CSV format...there is no formal specification in existence, which allows for a wide variety of interpretations of CSV files. Steve, It's been this

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Steve Crawford
On 01/31/2013 09:03 AM, Rich Shepard wrote: On Thu, 31 Jan 2013, Steve Crawford wrote: Definition of the CSV Format: While there are various specifications and implementations for the CSV format...there is no formal specification in existence, which allows for a wide variety of

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Adrian Klaver
On 01/31/2013 08:53 AM, Rich Shepard wrote: On Thu, 31 Jan 2013, Adrian Klaver wrote: http://www.postgresql.org/docs/9.2/interactive/sql-copy.html Adrian, I've read this. CSV Format ... The values in each record are separated by the DELIMITER character. If the value contains the

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Rich Shepard
On Thu, 31 Jan 2013, Adrian Klaver wrote: FORCE_QUOTE Forces quoting to be used for all non-NULL values in each specified column. NULL output is never quoted. If * is specified, non-NULL values will be quoted in all columns. This option is allowed only in COPY TO, and only when using CSV

Re: [GENERAL] COPY table to file missing quotation marks

2013-01-31 Thread Adrian Klaver
On 01/31/2013 10:17 AM, Rich Shepard wrote: On Thu, 31 Jan 2013, Adrian Klaver wrote: FORCE_QUOTE Forces quoting to be used for all non-NULL values in each specified column. NULL output is never quoted. If * is specified, non-NULL values will be quoted in all columns. This option is allowed