commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CSV-207) Provide a CSV Format for printing PostgreSQL CSV and Text formats
Date Mon, 27 Mar 2017 20:06:41 GMT

    [ https://issues.apache.org/jira/browse/CSV-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943928#comment-15943928
] 

Gary Gregory edited comment on CSV-207 at 3/27/17 8:06 PM:
-----------------------------------------------------------

We cannot seem to parse the stock PostgreSQL Text format, see 

- org.apache.commons.csv.CSVPrinterTest.testRandomPostgreSqlCsv()
- org.apache.commons.csv.CSVPrinterTest.testRandomPostgreSqlText()
- org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvNullOutput()
- org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvTextOutput()

I am guessing that the issue is that in PostgreSQL, the escape character is the same as the
quote character:

{quote}
QUOTE
Specifies the quoting character to be used when a data value is quoted. The default is double-quote.
This must be a single one-byte character. This option is allowed only when using CSV format.

ESCAPE
Specifies the character that should appear before a data character that matches the QUOTE
value. The default is the same as the QUOTE value (so that the quoting character is doubled
if it appears in the data). This must be a single one-byte character. This option is allowed
only when using CSV format.
{quote}



was (Author: garydgregory):
We cannot seem to parse the stock PostgreSQL Text format, see 

- org.apache.commons.csv.CSVPrinterTest.testRandomPostgreSqlText()
- org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvNullOutput()
- org.apache.commons.csv.CSVPrinterTest.testPostgreSqlCsvTextOutput()

I am guessing that the issue is that in PostgreSQL, the escape character is the same as the
quote character:

{quote}
QUOTE
Specifies the quoting character to be used when a data value is quoted. The default is double-quote.
This must be a single one-byte character. This option is allowed only when using CSV format.

ESCAPE
Specifies the character that should appear before a data character that matches the QUOTE
value. The default is the same as the QUOTE value (so that the quoting character is doubled
if it appears in the data). This must be a single one-byte character. This option is allowed
only when using CSV format.
{quote}


> Provide a CSV Format for printing PostgreSQL CSV and Text formats
> -----------------------------------------------------------------
>
>                 Key: CSV-207
>                 URL: https://issues.apache.org/jira/browse/CSV-207
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Printer
>            Reporter: Gary Gregory
>
> Provide a CSV Format for PostgreSQL



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message