Safe Haskell | Safe-Infered |
---|
- data EscapeCopyValue
- escapeCopyRow :: [EscapeCopyValue] -> ByteString
Documentation
data EscapeCopyValue Source
EscapeCopyNull | |
EscapeCopyText !ByteString | A PostgreSQL datum in its text representation. |
EscapeCopyBytea !ByteString | Raw binary data destined for storage in a |
Show EscapeCopyValue | |
Escape EscapeCopyValue |
escapeCopyRow :: [EscapeCopyValue] -> ByteStringSource
Escape a row of data for use with a COPY FROM statement. Include a trailing newline at the end.
This assumes text format (rather than BINARY or CSV) with the default delimiter (tab) and default null string (\N). A suitable query looks like:
COPY tablename (id, col1, col2) FROM stdin;