Hi, I saw the author also has this repo:
https://github.com/brianc/node-pg-copy-streams I'm curious if anybody has experience with it, or how it compares to the node-postgres Client that greelgorke mentioned? Cheers, Victor On Monday, 18 November 2013 19:57:35 UTC+11, greelgorke wrote: > > my 10 secs on that: > https://github.com/brianc/node-postgres/wiki/Client#wiki-bulk-load > > Am Montag, 18. November 2013 01:43:54 UTC+1 schrieb Victor Hooi: >> >> Hi, >> >> PostgreSQL offers a COPY command, to move data efficient between the >> database and files. >> >> So basically, you can bulk-export a SQL command into a local CSV command. >> >> I come from the Python world, and there's the psycopg2 library, which >> offers copy_to() method to dump a SQL command straight into a local >> file-like object: >> >> http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from >> >> I'm new to Node.js, and I'm wondering if there's something similar for >> Node.JS - perhaps that can stream the resulting CSV file back? >> >> I had a look at the node-postgres library: >> >> https://github.com/brianc/node-postgres >> >> and from what I can tell, it seems to operate on individual rows for a >> query result. >> >> Is there an efficient way of bulk dumping a PostgreSQL table into Node.JS? >> >> Cheers, >> Victor >> > -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
