[postgis-devel] [PostGIS] #1287: Drop of "gist_geometry_ops" broke a few clients

PostGIS trac at osgeo.org
Wed May 16 07:51:27 PDT 2012


#1287: Drop of "gist_geometry_ops" broke a few clients
----------------------+-----------------------------------------------------
  Reporter:  strk     |       Owner:  pramsey      
      Type:  defect   |      Status:  closed       
  Priority:  medium   |   Milestone:  PostGIS 2.0.0
 Component:  postgis  |     Version:  trunk        
Resolution:  wontfix  |    Keywords:  history      
----------------------+-----------------------------------------------------

Comment(by springmeyer):

 as a note to other users that hit this problem, and find this ticket, it
 appears possible to patch postgis 2.0 for back compatibility here.

 You can add to your db the below sql to re-implement `gist_geometry_ops`
 as identical to the new name of `gist_geometry_op_2d`.

 The reason I am doing this is because osm2pgsql (while updated now to work
 with postgis 2.0) has proved very difficult to get compiled and working on
 windows (https://github.com/springmeyer/osm2pgsql). So, for windows users
 I'm forging ahead with a method to get a 2 year old osm2pgsql working (the
 last available windows binary) with postgis 2.0 on windows, and this was
 the last piece of the puzzle after adding back srid 900913 and loading the
 legacy.sql.

 Happy to hear from the devs if this shim is a terrible idea and there
 might be better ways to alias this.

 {{{
 CREATE OPERATOR CLASS gist_geometry_ops
         FOR TYPE geometry USING GIST AS
         STORAGE box2df,
         OPERATOR        1        <<  ,
         OPERATOR        2        &<      ,
         OPERATOR        3        &&  ,
         OPERATOR        4        &>      ,
         OPERATOR        5        >>      ,
         OPERATOR        6        ~=      ,
         OPERATOR        7        ~       ,
         OPERATOR        8        @       ,
         OPERATOR        9        &<| ,
         OPERATOR        10       <<| ,
         OPERATOR        11       |>> ,
         OPERATOR        12       |&> ,

         OPERATOR        13       <-> FOR ORDER BY pg_catalog.float_ops,
         OPERATOR        14       <#> FOR ORDER BY pg_catalog.float_ops,
         FUNCTION        8        geometry_gist_distance_2d (internal,
 geometry, int4),

         FUNCTION        1        geometry_gist_consistent_2d (internal,
 geometry, int4),
         FUNCTION        2        geometry_gist_union_2d (bytea, internal),
         FUNCTION        3        geometry_gist_compress_2d (internal),
         FUNCTION        4        geometry_gist_decompress_2d (internal),
         FUNCTION        5        geometry_gist_penalty_2d (internal,
 internal, internal),
         FUNCTION        6        geometry_gist_picksplit_2d (internal,
 internal),
         FUNCTION        7        geometry_gist_same_2d (geom1 geometry,
 geom2 geometry, internal);
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1287#comment:8>
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-devel mailing list