Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW - Mailing list pgsql-admin

From Tom Lane
Subject Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW
Date
Msg-id 2657053.1654877707@sss.pgh.pa.us
Whole thread Raw
In response to Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-admin
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> I would have to see the dump to be certain, but my guess is that you need to make the function
> independent from the current setting of "search_path" by schema-qualifying the data type:

>   DECLARE
>      _row my_schema.row_reporting_p;

Yeah, that seems likely to be the explanation.  The restore will be run
under a restrictive search_path and functions that are not ready for that
will fail.  It may well be that this isn't the only search_path dependency
in the function, in which case you might be better advised to add a
"SET search_path" option to the function, instead of trying to fix all
the references manually.

            regards, tom lane



pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW
Next
From: Stephen Frost
Date:
Subject: Re: pg_basebackup and pg_receivewal timing, missing WAL files