Обсуждение: Easiest way to copy table from one db to another?

Поиск
Список
Период
Сортировка

Easiest way to copy table from one db to another?

От
"Kynn Jones"
Дата:


What's the simplest way to copy a table from one database to another one running on the same server?

TIA!

Kynn

Re: Easiest way to copy table from one db to another?

От
"Scott Marlowe"
Дата:
On Wed, Jun 18, 2008 at 1:48 PM, Kynn Jones <kynnjo@gmail.com> wrote:
>
>
> What's the simplest way to copy a table from one database to another one
> running on the same server?

Easiest way to me:

pg_dump -t tablename dbname | psql otherdbname

Re: Easiest way to copy table from one db to another?

От
"Kynn Jones"
Дата:
On Wed, Jun 18, 2008 at 4:08 PM, Scott Marlowe <scott.marlowe@gmail.com> wrote:
On Wed, Jun 18, 2008 at 1:48 PM, Kynn Jones <kynnjo@gmail.com> wrote:
>
>
> What's the simplest way to copy a table from one database to another one
> running on the same server?

Easiest way to me:

pg_dump -t tablename dbname | psql otherdbname

Thanks!

Kynn