Re: Simpler dump?

Поиск
Список
Период
Сортировка
От Ted Byers
Тема Re: Simpler dump?
Дата
Msg-id 88635.70964.qm@web88313.mail.re4.yahoo.com
обсуждение исходный текст
Ответ на Re: Simpler dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Simpler dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
--- Tom Lane <tgl@sss.pgh.pa.us> wrote:

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

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

В списке pgsql-general по дате отправления:

Предыдущее
От: Ted Byers
Дата:
Сообщение: Re: Simpler dump?
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: Simpler dump?