pg_dump -x -O -s [databasename] > outfile.sql HTH Uwe On Sunday 09 December 2007, Ted Byers wrote: > Is there a way to tell pg_dump to just dump the SQL > statements required to create the tables, sequences, > indeces, keys, &c.? I DON'T need to restore or > recreate things like users, or most other kinds of DB > objects. Just routine DDL statements. Looking > through a dump file for a small database, it looks > like pg_dump is serious overkill, dumping a lot of > stuff I don't need (since I'm just using defaults for > them anyway). > > I am developing a new DB app, to be deployed on a web > based host on the other side of the planet. There is, > at present, no 'data', and the only information to be > transferred consists of the various tables, indeces, > &c. I am creating. > > Obviously, we don't want to put any of my test data on > a server that will in due course be the production > host, when the app goes live (so once my colleagues on > the other side of the planet have had a chance to play > with what I've developed, we'll mostly empty the DB of > test data, except for a small amount of data we've > obtained). I expect that a few tiny csv files I have > here will be ftped to the host and we'd use a simple > script to bulk load that. Another fly in the ointment > is that the hosting company is still using v 8.1.9 and > I am using 8.2.5 on my machine, so I am concerned that > a regular dump and restore may be problematic: it > hasn't worked so far, but then I've spent much of my > time so far wrestling with phppgadmin. :-( > > I'm just looking for something that will save me a > little time. I've created the core of the DB already > on my development machine, using pgAdmin, but I can > recreate it in about a day using Emacs to create a SQL > script that preproduces what I did in pgAdmin. > > Any information would be appreciated. > > Thanks > > Ted > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend -- UC -- Open Source Solutions 4U, LLC 1618 Kelly St Phone: +1 707 568 3056 Santa Rosa, CA 95401 Cell: +1 650 302 2405 United States Fax: +1 707 568 6416 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your message can get through to the mailing list cleanly