Closed lvella closed 2 months ago
There's no way to do that with the built-in BinaryCopyInWriter. You could make a custom writer that would be able to do that (you do need to know the size of the buffer and the overall row up-front). IIRC Postgres will buffer the entire row in memory though regardless.
Depending how big these values are, you may want to consider using the large value API, which allows "real" streaming to and from the backend.
Thanks. I found your crate postgres_large_object.
It seems that
BinaryCopyInWriter
only works for full rows, but I would like to a singlebytea
field into the database as it is received from the network. Is this possible?