| От | Dawid Kuroczko |
|---|---|
| Тема | Re: Dumping table definitions |
| Дата | |
| Msg-id | 758d5e7f0507181008403969ec@mail.gmail.com обсуждение исходный текст |
| Ответ на | Dumping table definitions ("Mark Fenbers" <Mark.Fenbers@noaa.gov>) |
| Список | pgsql-sql |
On 7/18/05, Mark Fenbers <Mark.Fenbers@noaa.gov> wrote: > I am looking for a way to reformat the information that is generated from > \d mytable > into SQL syntax, such that the table can be recreated with 'psql -f > mytable.sql' complete with index and constraint definitions. I can do > awk and sed commands to do this if I need to, but first wanted to check > if Pg already had tools to export the table structure (without the > data). Does it? pg_dump is your friend! Use option -s (--schema-only). It will dump the information you want. :-) Regards, Dawid
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера