Kanitchet Vaiassava <kanichet(at)hotmail(dot)com> writes:
> Actual Behavior (postgres 17)
> * Calling the function directly works fine (search_path = public).
> * Calling the function through a Materialized View defaults search_path to pg_catalog, pg_temp, causing it to fail to find tables
This is an intentional change in v17.
> * PostgreSQLs security model in newer versions (15+) might enforce a stricter search_path default (pg_catalog, pg_temp) inside Materialized View refresh execution ???? (which I have not found in web's document)
It's the first compatibility issue listed in the v17 release notes:
https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-MIGRATION
regards, tom lane