You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Brian C
18fa1fdeb3
|
11 years ago | |
---|---|---|
test | 11 years ago | |
.gitignore | 11 years ago | |
README.md | 11 years ago | |
copy-to.js | 11 years ago | |
index.js | 11 years ago | |
package.json | 11 years ago |
README.md
node-pg-copy-streams
COPY FROM / COPY TO for node-postgres. Stream from one database to another, and stuff.
how? what? huh?
Did you know the all powerful PostgreSQL supports streaming binary data directly into and out of a table?
This means you can take your favorite CSV or TSV or whatever format file and pipe it directly into an existing PostgreSQL table.
You can also take a table and pipe it directly to a file, another database, stdout, even to /dev/null
if you're crazy!
The way I use this usually is to take a table from a production database and replicate it exactly into a dev or local database, but like I said, you can do a lot of funky stuff piping your tables around.
node.js just happens to be fantastic at piping too. We all win!