Re: Dumping tables with only create statements

Поиск
Список
Период
Сортировка
От Ridvan Lakas ng Bayan S. Baluyos
Тема Re: Dumping tables with only create statements
Дата
Msg-id 7f4f9efa0806270126l230b0435hdbdbdd6b5c7f4b01@mail.gmail.com
обсуждение исходный текст
Ответ на Dumping tables with only create statements  ("Ridvan Lakas ng Bayan S. Baluyos" <ridvan@baluyos.net>)
Список pgsql-novice
I already found the solution.

pg_dump -h <host> -U <user> <dbname> -t <table> -s > <file>

I thought that having the `-s` parameter would only mean dumping the schema of the entire database. I just learned that you can use it when you want to dump the schema of a specific table only.


Thanks,

Ridvan


On Fri, Jun 27, 2008 at 3:46 PM, Ridvan Lakas ng Bayan S. Baluyos <ridvan@baluyos.net> wrote:
Is there a way wherein I can dump only the create statements (plus the indexes and triggers) of a `specific` table without including the data? I just need the dump of the table structure, indexes, and triggers.


Thanks in advance,


Ridvan

--
リヅバン バルヨス
ridvan.baluyos@qualservcentral.com
http://ridvan.baluyos.net
http://www.onxiam.com/people/rbaluyos

Registered Linux User #439466
Registered Ubuntu User #16034
Q: Have you heard of the Object-Oriented way to get wealthy?
A: Inheritance.



--
リヅバン バルヨス
ridvan.baluyos@qualservcentral.com
http://ridvan.baluyos.net
http://www.onxiam.com/people/rbaluyos

Registered Linux User #439466
Registered Ubuntu User #16034
Q: Have you heard of the Object-Oriented way to get wealthy?
A: Inheritance.

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

Предыдущее
От: "Ridvan Lakas ng Bayan S. Baluyos"
Дата:
Сообщение: Dumping tables with only create statements
Следующее
От: "Yos Sunitiyoso"
Дата:
Сообщение: Automatic SQL command execution