Relative Content

Tag Archive for javascriptsqlnode.jspostgresqlbun

Postgres copy to STDOUT hangs indefinetly

I have a script that runs COPY on postgres to STDOUT. This stream is consumed by nodejs into a readable. This readable is passed to pipeline which writes to a csv file locally. I am using nodePG and nodePG-copy-stream to handle creating the postgres client and copy stream. Lastly, I execute my script with bun. I attached my example read/write code below.