-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per-field quoting #39
Comments
According to https://www.postgresql.org/docs/current/sql-copy.html you can use |
Yes, I'm using "NULL AS" as a workaround ( |
OK, understood. But your example is mixed up, I think. According to the doc, an unquoted empty string is handled as
Is that correct? |
Ah, yes, you're right. |
I consider this for the 2.0 release. Could you please check the commit faac271 to see if it covers your requirements. I don't think that a per field setting is required, though. |
Yes, looks like it will do the trick. |
Implemented in version 2. |
I need a way to enforce per-field quoting in order to generate CSV for PostgreSQL COPY statement because quoted empty string is treated as NULL, while totally empty field is treated as an empty string:
The current
CsvAppender
API doesn't support such behavior. Possible solutions:appendField
appendDelimitedField
alwaysDelimitText
field mutable so that the consumer can turn it off/on before appending the specific fieldThe text was updated successfully, but these errors were encountered: