From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | Pascal CROZET <pascal(dot)crozet(at)metanext(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW |
Date: | 2022-06-10 16:15:07 |
Message-ID: | 2657053.1654877707@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2022-06-10 16:33:25 | Re: pg_basebackup and pg_receivewal timing, missing WAL files |
Previous Message | Laurenz Albe | 2022-06-10 15:57:04 | Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW |