[postgis-tickets] [PostGIS] #4695: ERROR: GetGenericCacheCollection: Could not find upper context ST_AsGeoJSON and pg13

PostGIS trac at osgeo.org
Mon May 25 16:55:19 PDT 2020


#4695: ERROR:  GetGenericCacheCollection: Could not find upper context
ST_AsGeoJSON and pg13
---------------------+---------------------------
 Reporter:  robe     |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  blocker  |  Milestone:  PostGIS 3.1.0
Component:  postgis  |    Version:  master
 Keywords:           |
---------------------+---------------------------
 I'm running this query on PostGIS 3.1.0dev


 {{{
 POSTGIS="3.1.0dev 3.1.0alpha1-122-g16121bf79" [EXTENSION] PGSQL="130"
 GEOS="3.9.0-CAPI-1.14.0" PROJ="6.2.1" LIBXML="2.9.9" LIBJSON="0.12"
 LIBPROTOBUF="1.2.1" WAGYU="0.5.0 (Internal)"
 }}}

 and on PostgreSQL 13beta1 (headish).

 Steps to replicate the issue:


 {{{
  CREATE TABLE test AS
  SELECT row_number()OVER() AS id, 'test' || i::text || j::text AS name,
 ST_SetSRID(ST_Point(i,j),2227) AS geom
  FROM generate_series(1,10) AS i, generate_series(5,10,2) AS j;

 }}}


 This same query seems to work fine on PostgreSQL 12 with PostGIS 3.1.0.  I
 haven't tested with PostGIS 3.0 and 13 yet but assume it has the same
 issue.


 I'm guessing it has to do with the interaction of spatial_ref_sys, since
 this works fine:


 {{{
  CREATE TABLE test2 AS
  SELECT row_number()OVER() AS id, 'test' || i::text || j::text AS name,
 ST_Point(i,j) AS geom
  FROM generate_series(1,10) AS i, generate_series(5,10,2) AS j;

 }}}

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