public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Shaun Robinson <[email protected]>
To: [email protected]
Subject: Re: Error creating materialized view
Date: Mon, 25 Nov 2024 13:54:45 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMJoR-Zv-otrJE4Wejs9us5x3gf-LBMfL0XT4UfZym-abx-j8w@mail.gmail.com>
References: <CAMJoR-Zv-otrJE4Wejs9us5x3gf-LBMfL0XT4UfZym-abx-j8w@mail.gmail.com>

On Mon, 2024-11-25 at 06:08 +0000, Shaun Robinson wrote:
> I'm currently testing an application with Postgres 17.2 and am getting an error
> when creating a materialized view which works in version 16 and below. The sql
> works fine running as a query, but adding the create materialized view breaks it.
> 
> The error comes when calling a custom function and the error is that a relation
> doesn't exist (which it does as it works within the same query when not creating
> a view).
> 
> Is this a known issue in the version 17.2?

That's a deliberate improvemen; see the first point in
https://www.postgresql.org/docs/current/release-17.html#RELEASE-17-MIGRATION

you will have to schema-qualify all tables in the function or set the
"search_path" on the function.

Yours,
Laurenz Albe






view thread (2+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Error creating materialized view
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox