| От | Josh Berkus |
|---|---|
| Тема | Re: CREATE TABLES AS looses constraints |
| Дата | |
| Msg-id | 200305291348.01440.josh@agliodbs.com обсуждение |
| Ответ на | CREATE TABLES AS looses constraints (Tiaan Wessels <tiaan@netsys.co.za>) |
| Список | pgsql-sql |
Tiaan, > It seems as if a CREATE TABLES AS does not duplicate the table constraints. > How can I enforce this. I need the fastest possible way to make an exact copy > of a table. This is to support the administrative mechanism in an app where > changes are made to a mirrored copy of a set of tables first and when happy, > these are copied to the operational tables. I suggest using pg_dump, on the command line: pg_dump -T some_table my_database > some_table.pgdump; psql -U database_owner my_database_mirror < some_table.pgdump; This will copy triggers and indexes as well. -- -Josh BerkusAglio Database SolutionsSan Francisco
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера