pg_dump vs schemas

Поиск
Список
Период
Сортировка
От Francisco Reyes
Тема pg_dump vs schemas
Дата
Msg-id cone.1184371833.324427.28091.5001@35st.simplicato.com
обсуждение исходный текст
Ответы Re: pg_dump vs schemas  (Michael Glaesemann <grzm@seespotcode.net>)
Re: pg_dump vs schemas  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
pg_dump by default puts at the top
SET search_path = public,pg_catalog;

This considering a plain vanilla setup where no schemas other than public
have been created.

I however noticed that pg_dump also does this:
ALTER TABLE public.mytable OWNER TO pgsql;

Shouldn't the "public." be left out?
I verified that even if multiple tables exist with the same name only the
table in the first referenced schema in the path will be deleted.

By the same token shouldn't all references to schemas be left out?
In the case there are reasons why the schema is referenced, perhaps create a
parameter in pg_dump to omit the schema.

The rationale is to be able to easily move schemas in the target restore.
Specially if one was doing an entire database.

Alternatively is there any easy way to take all data in one schema and load
it into a target DB and a different schema?
The default produced by pg_dump would be a problem because of the "schema."
references.


As for why I am doing this schema move..
From what i can tell it may be best to have tsearch into it's own schema so
I either move tsearch out of public, or my data out of public. I figure
since public is what tsearch and other utilities like it target may be
easier to move the data out of public.

Currently trying a small data set to see how this work and whether it is
better to move the data out of public or tsearch.


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: restore dump to 8.19
Следующее
От: Tom Allison
Дата:
Сообщение: Re: multirow insert