pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Pascal CROZET <pascal.crozet@metanext.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW
Date: Fri, 10 Jun 2022 12:15:07 -0400
Message-ID: <2657053.1654877707@sss.pgh.pa.us> (raw)
In-Reply-To: <ff953d5f710168f2af17d510a847d079e94a98c7.camel@cybertec.at>
References: <CAH59SE=GKvZxWa++n+D33GV7xk1pyYu=jYzCtsJnXNsdaSSb=w@mail.gmail.com>
	<CAKFQuwZoK=gZ_n48djihvgFhgTC4o0Popu--Yak-ntnsTP5DKg@mail.gmail.com>
	<PAXP251MB01782EE9FF9A844E7157F52698A79@PAXP251MB0178.EURP251.PROD.OUTLOOK.COM>
	<ff953d5f710168f2af17d510a847d079e94a98c7.camel@cybertec.at>

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





view thread (4+ messages)

Message-ID: <2657053.1654877707@sss.pgh.pa.us>
Permalink:  ../2657053.1654877707@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2657053.1654877707@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, pascal.crozet@metanext.com
  Subject: Re: ERROR: type "my_user_type" does not exist on REFRESH MATERIALIZED VIEW
  In-Reply-To: <2657053.1654877707@sss.pgh.pa.us>

* 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