|
|
Subject: Simpler dump?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/10/2007 12:48:19 AM
Ted Byers <r.ted.byers@rogers.com> writes:
> Is there a way to tell pg_dump to just dump the SQL
> statements required to create the tables, sequences,
> indeces, keys, &c.?
pg_dump -s ?
> I DON'T need to restore or
> recreate things like users, or most other kinds of DB
> objects. Just routine DDL statements.
pg_dump doesn't try to recreate users, and to most people "DDL" would
include the creation commands for any type of DB object whatsoever.
Your demarcation between stuff you want and stuff you don't seems far
too vaguely stated.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Subject: Simpler dump?
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/10/2007 10:07:16 AM
Ted Byers <r.ted.byers@rogers.com> writes:
> It seems the public schema is
> automagically created by Postgres every time I create
> a new database on a given server, and it has over a
> dozen types, over 400 functions, &c. I don't really
> understand why it needs to be duplicated in every Db
> on a server, but that is another matter.
What it sounds like to me is that you've managed to clutter your
template1 with a lot of stuff you don't actually want, and that's
getting propagated into new databases by CREATE DATABASE. If so,
it's not pg_dump's fault --- you need to clean out template1.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
|