From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Hans Buschmann <buschmann(at)nidsa(dot)net> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db |
Date: | 2016-06-15 17:25:59 |
Message-ID: | CAKFQuwag=YiKTCbVE85EvuBx5aVC06ctsjtgA6tU_6-V4stVfQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Jun 15, 2016 at 1:26 PM, Hans Buschmann <buschmann(at)nidsa(dot)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 the
> 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.
>
Not sure if John just mis-understood you, mis-spoke, or doesn't understand
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Hans Buschmann | 2016-06-15 17:26:00 | Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db |
Previous Message | Hans Buschmann | 2016-06-15 15:49:58 | Re: BUG #14192: pg_dump/pg_restore omit setting search_path in restored db |