From: Stephen Frost <sfrost@snowman.net>
To: Ian R. Campbell <ian.campbell@thepathcentral.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: pg_dump does not fully include the schema, causing runtime errors
Date: Thu, 21 Sep 2017 17:31:15 -0400
Message-ID: <20170921213115.GM4628@tamriel.snowman.net> (raw)
In-Reply-To: <CAOC8YUcUJJywOjBsutUOtg9fQY7Wmg2veKKdLK6Cm8jKVyAcjQ@mail.gmail.com>
References: <CAOC8YUcUJJywOjBsutUOtg9fQY7Wmg2veKKdLK6Cm8jKVyAcjQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Greetings Ian,
* Ian R. Campbell (ian.campbell@thepathcentral.com) wrote:
> pg_dump uses SET search_path in order to simplify schema references. Below
> is a snippet of a CREATE TABLE definition that references a function in the
> 'internal' schema:
>
> ... stock_balances integer[] DEFAULT stock_balances_snapshot() ...
>
> This will restore OK, but it will not execute unless the caller also sets
> the search_path, which is certainly not a given or even to be expected.
I'm not really understanding what this sentence means.
Yes, it'll restore OK, and the result should work just fine. What do
you mean by "will not execute unless the caller also sets the
search_path" ... ?
> I have also observed the following output, which suffers the same issue:
>
> ... role "internal".user_role NOT NULL DEFAULT
> 'guest'::user_role ...
What is the issue you're referring to?
> Can pg_dump have an option to output fully qualified schema?
You've not shown why such an option is needed, so it's pretty hard to
see why it would make sense to add it.
Thanks!
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: sfrost@snowman.net, ian.campbell@thepathcentral.com
Subject: Re: pg_dump does not fully include the schema, causing runtime errors
In-Reply-To: <20170921213115.GM4628@tamriel.snowman.net>
References: <CAOC8YUcUJJywOjBsutUOtg9fQY7Wmg2veKKdLK6Cm8jKVyAcjQ@mail.gmail.com> <20170921213115.GM4628@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox