Dumping table definitions

Поиск
Список
Период
Сортировка
От Mark Fenbers
Тема Dumping table definitions
Дата
Msg-id 42DBDDEE.3090903@noaa.gov
обсуждение исходный текст
Ответы Re: Dumping table definitions  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Dumping table definitions  ("Jim Buttafuoco" <jim@contactbda.com>)
Re: Dumping table definitions  (Dawid Kuroczko <qnex42@gmail.com>)
Список pgsql-sql
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?

Also, Is there a way to export the structure of all tables at once
instead of one table at a time?

Mark

Вложения

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

Предыдущее
От: Ying Lu
Дата:
Сообщение: About retrieving objects' priviledge info such as grantee & its privileges for a specific object (view, table, function, etc.)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Dumping table definitions