Thread: Dump Schema?

Dump Schema?

From
"Chris Ruprecht"
Date:
Hi guys,
 
I have a database on my production machine and I want a copy of this db (9 GB) - without the data - on a development machine (notebook with about 6 GB of space).
How can I just dump the schema without the data? Is there a simple command for that?
 
Best regards,
Chris
 

Re: Dump Schema?

From
George Lewis
Date:
pg_dump -s dbname

Chris Ruprecht (chrup999@yahoo.com) wrote:
> Hi guys,
>
> I have a database on my production machine and I want a copy of this db (9 GB) - without the data - on a development
machine(notebook with about 6 GB of space). 
> How can I just dump the schema without the data? Is there a simple command for that?
>
> Best regards,
> Chris
>

--
http://schvin.net/

Re: Dump Schema?

From
Karel Zak
Date:
On Fri, Jul 27, 2001 at 08:55:05AM -0500, Chris Ruprecht wrote:
> Hi guys,
>
> I have a database on my production machine and I want a copy of this db (9 GB) - without the data - on a development
machine(notebook with about 6 GB of space). 
> How can I just dump the schema without the data? Is there a simple command for that?
>

pg_dump

  -s, --schema-only        dump out only the schema, no data

 Something is bad on docs or pg_dump --help? :-)

            Karel

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

Re: Dump Schema?

From
"Chris Ruprecht"
Date:
Thanks all who responded, I got that working just fine ;-). I should read the manual some time ...
 
To my surprise, I saw my Pl/PGSQL procedures (functions) dumped there as well. Is there any way to 'encode' them so that the end user is not able to read them in clear text and (heavens forbid) change them?
 
Best regards,
Chris