[postgis-tickets] [PostGIS] #4608: Geography GIST index fails on table named test

PostGIS trac at osgeo.org
Fri Dec 20 11:59:31 PST 2019


#4608: Geography GIST index fails on table named test
---------------------+---------------------------
 Reporter:  jgh      |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  low      |  Milestone:  PostGIS 3.1.0
Component:  postgis  |    Version:  3.0.x
 Keywords:           |
---------------------+---------------------------
 st_contains relying on a GIST index on a geography column fails if the
 table is named public.test.

 It seems to work fine with another table name OR another schema.

 It was observed with st_contains but could affect other functions, though
 at least st_intersects works fine.

 The issue was first reported here:
 https://gis.stackexchange.com/questions/344408/st-covers-fails-on-
 geography-column-with-gist-index-postgis-3-0


 select postgis_full_version();

  POSTGIS="3.0.0 r17983" [EXTENSION] PGSQL="120" GEOS="3.8.0-CAPI-1.13.1 "
 PROJ="Rel. 5.2.0, September 15th, 2018" LIBXML="2.9.9" LIBJSON="0.12"
 LIBPROTOBUF="1.2.1" WAGYU="0.4.3 (Internal)"

 ------

 CREATE TABLE test (id SERIAL, the_geog GEOGRAPHY);

 CREATE INDEX test_geog_idx ON test USING GIST(the_geog);

 SELECT id FROM test WHERE ST_Covers(the_geog, ST_GeogFromText('POINT(-0.1
 51.5)'));

 ERROR:  no spatial operator found for opfamily 118328 strategy 7


 ---------


 CREATE TABLE test1 (id SERIAL, the_geog GEOGRAPHY);

 CREATE INDEX test_geog_idx ON test USING GIST(the_geog);

 SELECT id FROM test1 WHERE ST_Covers(the_geog, ST_GeogFromText('POINT(-0.1
 51.5)'));
  id
 (0 row)


 While the impact on a production server is almost nul, having a
 public.test table is fairly common so this issue could affect a large
 amount of users.

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4608>
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