Search Postgresql Archives

Re: Simpler dump?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- Tom Lane <tgl@xxxxxxxxxxxxx> wrote:

> Ted Byers <r.ted.byers@xxxxxxxxxx> 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 ?
> 

Thanks Tom

> > 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.
> 
Sorry,

I just wanted the statements I need to recreate the
tables, sequences and constraints I created.  When I
create a database, I leave the default public schema
alone.  The tables, etc. I add are placed in a
separate schema.  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.  In my
database, so far I have only created a dozen sequences
and two dozen tables, along with a suite of
constraints.  So when I look at the dump file, out of
6833 lines of SQL, the first 5744 relate to the
default public schema and only the last 1100 relate to
DB objects I'd created.  I'd assume that the public
schema would be created with the usual stuff when I
create the database name on the production host
anyway, so why recreate all that in the dump file?

Thanks again,

Ted

---------------------------(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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux