pg_dump of only the structure from a client such as ruby

From: Perry Smith <pedz(at)easesoftware(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_dump of only the structure from a client such as ruby
Date: 2007-08-05 21:31:08
Message-ID: 8094D747-EE8A-49A1-B056-CA82B0D5EB77@easesoftware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)easesoftware(dot)com )
Ease Software, Inc. ( http://www.easesoftware.com )

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Lambert 2007-08-05 23:06:11 Changing column types
Previous Message Merlin Moncure 2007-08-05 14:48:08 Re: array_to_set functions