BUG #18813: Materialized view creation regression when inlining recursive SQL function - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18813: Materialized view creation regression when inlining recursive SQL function
Date
Msg-id 18813-d5dadfa976a8ee2e@postgresql.org
Whole thread Raw
Responses Re: BUG #18813: Materialized view creation regression when inlining recursive SQL function
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18813
Logged by:          Olivier Jolly
Email address:      zeograd@gmail.com
PostgreSQL version: 17.3
Operating system:   Debian 12.2 (official docker images)
Description:

Hi,
  I've encountered an error when creating a materialized view as I updated
its body by introducing a recursive function.

On postgreSQL 16, it works as expected: the materialized view is created and
works as intended. 
Starting from posgreSQL 17.0, the materialized view created failed with the
error message

ERROR:  function jsonb_recursive_merge(jsonb, jsonb) does not exist
LINE 9:                    ELSE jsonb_recursive_merge(va::jsonb, vb:...
                                ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.
CONTEXT:  SQL function "jsonb_recursive_merge" during inlining

postgreSQL 17.3 also returns the same error.

A somewhat minimal .sql script triggering the error (as well as reproducible
CLI invocations and results from the execution in 16.7, 17.0 and 17.3
official docker images) is available on
https://gitlab.com/-/snippets/4807302

I would expect that postgreSQL 17.x allows creating my materialized view
like it did in postgreSQL 16.7

Thanks in advance for your help,
  Olivier


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18812: Conditional rule: inconsistent check for statement
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #18813: Materialized view creation regression when inlining recursive SQL function