Re: BUG #15282: Materialized view with transitive TYPE dependency fails refresh using pg_restore and psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #15282: Materialized view with transitive TYPE dependency fails refresh using pg_restore and psql
Дата
Msg-id 17166.1531847498@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #15282: Materialized view with transitive TYPE dependency failsrefresh using pg_restore and psql  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #15282: Materialized view with transitive TYPE dependencyfails refresh using pg_restore and psql  (Keith Hickey <kwhickey@gmail.com>)
Список pgsql-bugs
=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> A materialized view runs a select query that uses a function on one of its
> projected columns which internally uses an enum TYPE to map the column value
> to an enum value.

> Action and Resulting Error:
> Trying to restore a database setup in the above way will fail with error:
> ERROR:  type "<type_name>" does not exist

If this started happening recently, the problem is likely that the type
is not in the restrictive search_path that dump/restore now uses.  You
could possibly fix it just by schema-qualifying the type name in the
function body.  However, that may only let you get as far as the next
failure of the same kind.  A better fix is to add a "SET search_path"
clause to the function definition so that it works independently of
what the caller's search path is.

            regards, tom lane


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

Предыдущее
От: Moshe Jacobson
Дата:
Сообщение: Re: pg_restore: All GRANTs on table fail when any one role is missing
Следующее
От: Thomas Butz
Дата:
Сообщение: Autovacuum analyze can't find C based function