Re: Error while executing a view in postgres 10.5 - Mailing list pgsql-sql

From Jonathan S. Katz
Subject Re: Error while executing a view in postgres 10.5
Date
Msg-id 7D22B6B0-E502-41EE-93FD-A649B1C31144@excoventures.com
Whole thread Raw
In response to Re: Error while executing a view in postgres 10.5  (pavan95 <pavan.postgresdba@gmail.com>)
List pgsql-sql
Hi,

ERROR:  set-returning functions are not allowed in CASE
LINE 37:                         else regexp_split_to_table(privs,E'\...
                                     ^
HINT:  You might be able to move the set-returning function into a LATERAL
FROM item.

Starting in PostgreSQL 10, set-returning functions are no longer
allowed in CASE statements[1].

As it suggests, you can try moving the expression to a LATERAL
subquery[2]. Taking a quick look at the query, you would need
to rewrite a good portion of it in order to do so, but it would then
work with the updated versions of PostgreSQL.

Jonathan

“Change the implementation of set-returning functions”
[2] https://www.postgresql.org/docs/current/queries-table-expressions.html#QUERIES-LATERAL
Attachment

pgsql-sql by date:

Previous
From: pavan95
Date:
Subject: Re: Error while executing a view in postgres 10.5
Next
From: Andreas Kretschmer
Date:
Subject: Re: Archival process of partition tables with filtering few rows from tables.