For development I find myself needing to copy table information from one table to another quite often. I am just curious what are the easiest solutions to do this for Postgres. I have PGAdminIII but it looks like it really only support the long drawn out Backup/Restore.
Is there a python or bash script somewhere or something that I can just give it the basic infomation?
- Here is DB1
- Here is DB2
- Copy Tables …
- Go!
I believe SQLYog did this for MySQL in Win32, but I am now on OSX and using Postgres.
If you’re just moving between two PostgreSQL databases, a good way is to just use pg_dump and pg_restore in a pipe (or pg_dump and psql). Basically
(adjust switches as necessary for your environment, see the man pages)
It’s tools you have already installed, and if you just want to transfer the data and not modify it, it’ll be a lot faster than a full-blown ETL too like Kettle.