Opened 4 years ago

Last modified 4 years ago

#4695 closed defect

ERROR: GetGenericCacheCollection: Could not find upper context ST_AsGeoJSON and pg13 — at Initial Version

Reported by: robe Owned by: pramsey
Priority: blocker Milestone: PostGIS 3.1.0
Component: postgis Version: master
Keywords: Cc:

Description

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;
 

Change History (0)

Note: See TracTickets for help on using tickets.