Re: Error creating materialized view

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Shaun Robinson <srobinson(at)mdxperience(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Error creating materialized view
Date: 2024-11-25 12:54:45
Message-ID: c9ad7d70d6e60acf4cc2dce4c065f6849368ad6c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2024-11-25 16:00:04 Re: Unique key constraint Issue
Previous Message Ilya Anfimov 2024-11-25 09:48:51 Re: Questions on Upgrading PostgreSQL from 15.0 to 15.9 and Setting Up Streaming Replication