[PostGIS] #5790: Postgis-functions in Materialized views fail in Postgres 17 due to not fully qualified search path

PostGIS trac at osgeo.org
Sat Oct 19 03:00:41 PDT 2024


#5790: Postgis-functions in Materialized views fail in Postgres 17 due to not
fully qualified search path
----------------------+---------------------------
  Reporter:  maxbo    |      Owner:  robe
      Type:  defect   |     Status:  new
  Priority:  high     |  Milestone:  PostGIS 3.4.4
 Component:  postgis  |    Version:  3.4.x
Resolution:           |   Keywords:
----------------------+---------------------------
Comment (by mboeringa):

 Just wanted to add that I am running into similar issues with a "CREATE
 MATERIALIZED VIEW" statement, see the error message below that indicates
 the 'spatial_ref_sys' table cannot be found (but it is installed in the
 proper 'public' schema location where it always resided). This is PG17 /
 PostGIS 3.5.0. If I swap out "CREATE MATERIALIZED VIEW" with "CREATE
 TABLE" in the original SQL statement (not included here), the exact same
 SQL will work.


 {{{
 SQL Error [42P01]: ERROR: relation "spatial_ref_sys" does not exist
 LINE 2:  FROM spatial_ref_sys WHERE srid=public.ST_SRID($1);
               ^
 QUERY:  SELECT public.postgis_transform_geometry($1, proj4text, $2, 0)
         FROM spatial_ref_sys WHERE srid=public.ST_SRID($1);
 CONTEXT:  SQL function "st_transform" during inlining

 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5790#comment:2>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list