Hacker News new | ask | show | jobs
by dambi0 1000 days ago
What specific risks do you foresee with this approach?
2 comments

Seem totally fine to me. As long as you can rollback if the download is truncated or the crc checksum doesn’t match.
> or the crc checksum doesn’t match.

which wouldn't exist if the api is simply just a single CSV file?

at least with a zip, the CRC exists (an incomplete zip file is detectable, an incomplete, but syntactically correct CSV file is not)

DROP DATABASE blah;
That’s not how COPY FROM works in postgres. You give it a csv and a table matching the structure and it hammers the data into the table faster than anything else can.