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

PostGIS trac at osgeo.org
Thu Jan 29 07:51:10 PST 2026


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

 @landry,

 I think this might be a separate issue cause I think the error for these
 usually included the function in question.  Unfortunately I don't have a
 PostGIS 3.5.1 or 3.5.2 lying around.

 I tested this on 3.6.1 and behaved correctly:

 Can you try this and see if you get the same area.


 {{{
 DROP TABLE IF EXISTS public.test;
 CREATE TABLE public.test AS
 SELECT ST_MakeEnvelope(35,45, 36,i, 4326) AS geom
 FROM generate_series(46,50) AS i;


 ANALYZE public.test;
 DROP MATERIALIZED VIEW IF EXISTS test_grid;
 CREATE MATERIALIZED VIEW test_grid AS
 SELECT *
 FROM
     ST_SquareGrid(
         0.1,
         ST_SetSRID(ST_EstimatedExtent('public', 'test', 'geom'), 4326)
     ) AS g;
 SET search_path=pg_catalog;
 SELECT * FROM public.test_grid;
 }}}


 Can you also confirm your public.pictures.geom column is really a geometry
 or geography.
 You can do that in psql with

 {{{
  \d+  public.pictures
 }}}
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5790#comment:10>
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