Re: [BUGS] pg_dump does not fully include the schema, causingruntime errors

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [BUGS] pg_dump does not fully include the schema, causingruntime errors
Дата
Msg-id 20170921213115.GM4628@tamriel.snowman.net
обсуждение исходный текст
Ответ на [BUGS] pg_dump does not fully include the schema, causing runtime errors  ("Ian R. Campbell" <ian.campbell@thepathcentral.com>)
Список pgsql-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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] pg_dump does not fully include the schema, causing runtime errors
Следующее
От: Venkata B Nagothi
Дата:
Сообщение: Re: [BUGS] pg_basebackup