| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Database.PostgreSQL.Copy.Escape
Synopsis
Documentation
data EscapeCopyValue Source #
Constructors
| EscapeCopyNull | |
| EscapeCopyText !ByteString | A PostgreSQL datum in its text representation. |
| EscapeCopyBytea !ByteString | Raw binary data destined for storage in a |
Instances
| Show EscapeCopyValue Source # | |
Defined in Database.PostgreSQL.Copy.Escape Methods showsPrec :: Int -> EscapeCopyValue -> ShowS # show :: EscapeCopyValue -> String # showList :: [EscapeCopyValue] -> ShowS # | |
escapeCopyRow :: [EscapeCopyValue] -> ByteString Source #
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;