From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kanitchet Vaiassava <kanichet@hotmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: (Bug? or Intended?) Inconsistent search_path Behavior in Function Calls via Materialized View in PostgreSQL 17
Date: Mon, 17 Feb 2025 10:34:16 -0500
Message-ID: <823491.1739806456@sss.pgh.pa.us> (raw)
In-Reply-To: <KL1PR0401MB51326DEE3C1BA7DE89488B92D8FB2@KL1PR0401MB5132.apcprd04.prod.outlook.com>
References: <KL1PR0401MB51326DEE3C1BA7DE89488B92D8FB2@KL1PR0401MB5132.apcprd04.prod.outlook.com>
Kanitchet Vaiassava <kanichet@hotmail.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.
> * PostgreSQLÂ’s 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
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, kanichet@hotmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: (Bug? or Intended?) Inconsistent search_path Behavior in Function Calls via Materialized View in PostgreSQL 17
In-Reply-To: <823491.1739806456@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