pg_dump of only the structure from a client such as ruby - Mailing list pgsql-general

From Perry Smith
Subject pg_dump of only the structure from a client such as ruby
Date
Msg-id 8094D747-EE8A-49A1-B056-CA82B0D5EB77@easesoftware.com
Whole thread Raw
Responses Re: pg_dump of only the structure from a client such as ruby  (Michael Glaesemann <grzm@seespotcode.net>)
List pgsql-general
How hard would it be to do the following two statements (the equivalent of the following two statements) using a client?

pg_dump -i -U uuuuu -s -x -O -f file dbname

psql -U uuuuu -f file dbname

I'm trying to help out the rails people.  Currently they have "rake" scripts which call pg_dump, dropdb, createdb, and psql.  It would be nicer if this could be done via a database connection.

The psql piece I believe is fairly easy.  But I don't know where to begin with the pg_dump piece of it.  I took a glance at the pg_dump code and it is hugh... so I got scared and ran away.

Perry Smith ( pedz@easesoftware.com )
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems


pgsql-general by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: array_to_set functions
Next
From: Paul Lambert
Date:
Subject: Changing column types