codd
codd copied to clipboard
Test COPY FROM STDIN encodings
I think I implemented an overly simplistic parser for COPY, and it will likely fail for variations of COPY.
All possible combinations of the following need automated testing:
- custom delimiters
- blob columns
- text cells with newlines, tabs, simple quotes, double quotes etc.
- cells with NULL
- CSV/TEXT formats (others if they exist)
- HEADER TRUE/FALSE
- Custom encoding
I attempted lots of combinations of COPY TO STDOUT with all kinds of variations. None of it seems to matter because the end-of-body marker is always the same, and I assume postgres is the one that does all the heavy lifting of looking at delimiters, quoting, escaping, null strings, format, headers etc.
Encoding is the one thing I'm not sure how is handled, but I'm not going to worry about it right now. I'm changing the title of the issue and making it low priority.