Closed
Description
Hi!
COPY
is the most efficient way to import data to PostgreSQL database (it is less flexible than INSERT
, but has significantly less overhead).
https://www.postgresql.org/docs/current/sql-copy.html
https://www.postgresql.org/docs/current/populate.html#POPULATE-COPY-FROM
It would be great to have a low-level interface to stream data to/from PostgreSQL using COPY ... FROM STDIN
and COPY ... TO STDOUT
statements. For example, similar to https://docs.rs/tokio-postgres/0.5.1/tokio_postgres/struct.Client.html#method.copy_in and https://docs.rs/tokio-postgres/0.5.1/tokio_postgres/struct.Client.html#method.copy_out.