Commit b608efe3 authored by Regina Obe's avatar Regina Obe

Change from using CTE to use subquery so results are the same across all platforms

reason necessary in PostgreSQL 12, CTE changed from being always materialized to being often inlined.  
This means PG12, no longer behaves like old CTE and behaves more like subquery.
As a result 12 CTE is outputting 4 warnings instead of 1 like older versions. 
Changing to just subquery should force all to output 4 warnings.
references #4329 for PostGIS 3.0

git-svn-id: http://svn.osgeo.org/postgis/trunk@17267 b70326c6-7e19-0410-871a-916f4a2858ee
parent b673e590
Pipeline #48583486 passed with stage
in 31 minutes and 33 seconds
......@@ -159,24 +159,24 @@ analyze c2;
analyze p;
-- #3391.17
with e as ( select ST_EstimatedExtent('public','p','g','f') as e )
select '#3391.17', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2)
from ( select ST_EstimatedExtent('public','p','g','f') as e) AS e;
-- #3391.18
with e as ( select ST_EstimatedExtent('public','p','g','t') as e )
select '#3391.18', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2)
from ( select ST_EstimatedExtent('public','p','g','t') as e )AS e;
-- #3391.19
with e as ( select ST_EstimatedExtent('public','c1','g', 'f') as e )
select '#3391.19', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2)
from ( select ST_EstimatedExtent('public','c1','g', 'f') as e ) AS e;
-- #3391.20
with e as ( select ST_EstimatedExtent('public','c1','g', 't') as e )
select '#3391.20', round(st_xmin(e.e)::numeric, 2), round(st_xmax(e.e)::numeric, 2),
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2) from e;
round(st_ymin(e.e)::numeric, 2), round(st_ymax(e.e)::numeric, 2)
from ( select ST_EstimatedExtent('public','c1','g', 't') as e ) AS e;
drop table p cascade;
......@@ -212,4 +212,4 @@ insert into test (geom1, geom2) select NULL, NULL;
insert into test (geom1, geom2) select NULL, NULL;
insert into test (geom1, geom2) select NULL, NULL;
ANALYZE test;
drop table test cascade;
\ No newline at end of file
drop table test cascade;
......@@ -35,6 +35,9 @@ WARNING: stats for "c1.g" do not exist
#3391.16||||
#3391.17|0.00|1.00|0.00|1.00
WARNING: stats for "p.g" do not exist
WARNING: stats for "p.g" do not exist
WARNING: stats for "p.g" do not exist
WARNING: stats for "p.g" do not exist
#3391.18||||
#3391.19|0.00|1.00|0.00|1.00
#3391.20|0.00|1.00|0.00|1.00
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment