Re: How to clone a table to an empty one

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to clone a table to an empty one
Дата
Msg-id 3867.982427109@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to clone a table to an empty one  (Ramiro Alba <ramiro@labtie.mmt.upc.es>)
Список pgsql-sql
Ramiro Alba <ramiro@labtie.mmt.upc.es> writes:
> I would need to create an exact reproduction of a certain table
> (excluding data) converving primary key attributes and so on.

Trypg_dump -s -t tablename dbname | psql dbname

There is no easy way to do this directly in SQL ...
        regards, tom lane


В списке pgsql-sql по дате отправления:

Предыдущее
От: Ramiro Alba
Дата:
Сообщение: How to clone a table to an empty one
Следующее
От: Roberto Mello
Дата:
Сообщение: PL/SQL-to-PL/PgSQL-HOWTO beta Available