![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Just learning postgresql, and SQL. Is this an appropriate place to ask simple questions? If not pls direct me. |
#3
| |||
| |||
|
|
Anon432 Vqfz wrote: Just learning postgresql, and SQL. Is this an appropriate place to ask simple questions? If not pls direct me. This place is appropriate for PostgreSQL and PostgreSQL's dialect of SQL. You should, however, not expect that people will solve your homework for you, and you should be willing and ready to read documentation. How else should you learn? |
|
All your other questions can be easily answered by looking up the documentation for pg_dump and psql in http://www.postgresql.org/docs/current/static/ or alternatively by consulting the man pages of the respective commands. |
#4
| |||
| |||
|
|
Understood. I did read those man pages and ran some tests yesterday. Here's a link w/the goal restated and a tiny test case: http://schemaonlyrest0-qewbn.posterous.com Any comments on above approach appreciated. |
#5
| ||||||
| ||||||
|
|
Anon432 Vqfz wrote: Understood. I did read those man pages and ran some tests yesterday. Here's a link w/the goal restated and a tiny test case: http://schemaonlyrest0-qewbn.posterous.com Any comments on above approach appreciated. It is a bit hard to read, but I think I understood it. |
|
Your approach should work fine. |
|
The final pg_dump is for verification, right? |
|
Here is what I would do differently: - I would use -Fc instead of -Ft. The custom format is compressed and more flexible. |
|
- I would add the -s switch to pg_dump and not to pg_restore. Why dump all the data if you only restore the object definitions? |
|
Yours, Laurenz Albe |
![]() |
| Thread Tools | |
| Display Modes | |
| |