Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db
От | David G. Johnston |
---|---|
Тема | Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db |
Дата | |
Msg-id | CAKFQuwag=YiKTCbVE85EvuBx5aVC06ctsjtgA6tU_6-V4stVfQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db ("Hans Buschmann" <buschmann@nidsa.net>) |
Список | pgsql-bugs |
On Wed, Jun 15, 2016 at 1:26 PM, Hans Buschmann <buschmann@nidsa.net> wrote= : > On 6/15/2016 John R Pierce wrote: > > >that syntax is indeed stored with the database schema, and would be part > >of a database dump. > > > >you also can simply SET search_path 'somevalue'; and this applies > >only to the current session, and wouldn't be part of the database > > > This is the point I don't understand. > You said, the syntax ALTER DATABASE xxxdb SET SEARCH PATH is stored in th= e > database and would be part of a database dump. > > But to my observation, this is not the case. I certainly set the search > path to the database (not the session) on the dumping machine, but it is > not restored with pg_restore. > > I verified this with a little test database and checked the resulting SQL > dump. (You may do it yourself). > > The databse search path appeared not in the dump. > =E2=80=8BNot sure if John just mis-understood you, mis-spoke, or doesn't un= derstand what "ALTER DATABASE SET" does but indeed his comment was incorrect insofar as it was used to answer the question you posed. ALTER DATABASE SET installs a cluster record that points to a specific database in the same cluster. The cluster contains multiple databases and pg_dumpall is used to obtain those items that are cluster-oriented (even if the specific values only would pertain to a single database in the cluster). David J.
В списке pgsql-bugs по дате отправления: