Hi, sorry to enter this as an issue.
I'm using .query("insert into...") and it's too slow.
I couldn't find how to bulk-insert data. It says something about the copy command in the README.md, but I wouldn't know how to use that (only ever used that to insert from csv file from psql shell)
can you give me a hint?
Hi.
There are an example in #267
Client has additional methods copyFrom and copyTo. Both of them creates stream (writable/readable), and than you need to send correctly formatted text (csv or something else, like described here http://www.postgresql.org/docs/9.2/static/sql-copy.html) into stream
@anton-kotenko interested in adding those methods to the wiki?
Yes, I'll write docs in a few hours, when become more familiar with markdown syntax.
Add new chapter dedicated to Bulk data load https://github.com/brianc/node-postgres/wiki/Client#wiki-bulk-load.
But English is not my native language, so probably there are some mistakes in text.
@anton-kotenko thanks for documenting!
https://github.com/brianc/node-postgres/wiki/Client#wiki-bulk-load
@anton-kotenko @brianc : Looks like the bulk load link is not available anymore. Is it documented somewhere else?
Most helpful comment
@anton-kotenko @brianc : Looks like the bulk load link is not available anymore. Is it documented somewhere else?