Would be nice to support COPY TO/FROM STDOUT/STDIN by writing to a temp file and than emitting the result as a binary stream.