how to copy table to another database?
how to copy table to another database?
От:
"Yudie" <yudie@axiontech.com>
Дата:
Hi,
Anyone know how the procedure or commands to copy table to another database.
or querying from another database if possible?
thank you
yudie
Anyone know how the procedure or commands to copy table to another database.
or querying from another database if possible?
thank you
yudie
Re: how to copy table to another database?
От:
Dmitry Tkach <dmitry@openratings.com>
Дата:
Yudie wrote: > Hi, > Anyone know how the procedure or commands to copy table to another > database. > or querying from another database if possible? > > thank you > > yudie Something like this, perhaps? psql -d first_database -c '\copy mytable to stdout' | psql -d second_database -c '\copy mytable from stdin' I hope, it helps... Dima
Re: how to copy table to another database?
От:
"scott.marlowe" <scott.marlowe@ihs.com>
Дата:
On Fri, 18 Jul 2003, Yudie wrote: > Hi, > Anyone know how the procedure or commands to copy table to another database. > or querying from another database if possible? If you want to copy a table from one db to another, you can use this: pg_dump dbname -t tablename |psql dbname -e If you want cross database queries, look in the /contrib/dblink dir in the tarball of postgresql