Re: pg_dump not dumping some schemas

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: pg_dump not dumping some schemas
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B36618A43@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: pg_dump not dumping some schemas  ("Guo, Yun" <YGuo@cvent.com>)
Ответы Re: pg_dump not dumping some schemas
Список pgsql-admin
Yun Guo wrote:
>>> I use this command to dump schema:
>>> pg_dump -s -n test polling_etl  > file.sql
>>>
>>> However, the file.sql file includes creation of all the objects in
>>> schema test, but not the creation of test schema itself.

>>> polling_etl=# \dn+ test
>>>                 List of schemas
>>>  Name | Owner | Access privileges | Description
>>> ------+-------+-------------------+-------------
>>>  test | test  | test=UC/test     +|
>>>       |       | pb_writer=UC/test+|
>>>       |       | =U/test          +|
>>>       |       | postgres=U*C/test |

> I tried again. It¹s still not dumping CREATE SCHEMA. And weirdly it would
> work for some other schemas in the same database.
> 
> -bash-4.1$ pg_dump -s -n test polling_etl | grep 'CREATE SCHEMA'
> -bash-4.1$ pg_dump -s -n test2 polling_etl | grep 'CREATE SCHEMA'
> CREATE SCHEMA test2;

That is disturbing.

Does the schema show up in a custom format dump?

pg_dump -s -n test -Fc polling_etl | pg_restore -l

Yours,
Laurenz Albe

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: Warning when connecting from PSQL Command
Следующее
От: Thomas SIMON
Дата:
Сообщение: Re: Performances issues with SSD volume ?