Opened 9 years ago

Closed 8 years ago

#3396 closed defect (fixed)

[regression] ST_EstimatedExtent errors out when no stats are found

Reported by: strk Owned by: pramsey
Priority: high Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description

According to #877 this was fixed 4 years ago, and the PostGIS Manual indeed reports it should return NULL instead since 1.5.4 — http://postgis.net/docs/manual-2.2/ST_EstimatedExtent.html

In current trunk, I see it raising an exception instead. It's to be checked WHEN it regressed, and I think we should make it match the documentation…

Change History (8)

comment:1 by strk, 9 years ago

The commit that switched from ERROR to WARNING for 1.5.4: https://trac.osgeo.org/postgis/changeset/8319

comment:2 by strk, 9 years ago

POSTGIS="2.0.8SVN r14008" returns NULL.

Quick testcase:

CREATE TABLE t(g geometry);
SELECT ST_Estimated_Extent('t','g');

comment:3 by strk, 9 years ago

It's curious that the existing test for ticket #877 is expecting an ERROR instead of a WARNING !

I found the commit that changed such behavior: r10796, by Paul while adding 3d/4d index bindings

comment:4 by strk, 9 years ago

So it looks like 2.1.0 was the first to switch back to ERROR. What do we do now ? Current situation:

 1.0.0 - 1.5.3     : ERROR
 1.5.4 - 1.5.10    : WARNING
 2.0.0 - 2.0.8dev  : WARNING
 2.1.0 - 2.1.9dev  : ERROR
 2.2.0 - 2.2.1dev  : ERROR
Last edited 9 years ago by strk (previous) (diff)

comment:5 by pramsey, 9 years ago

Going back to warning shouldn't be a problem, it's unlikely anyone depends on error. However, apparently it's sufficiently rare that hardly anyone depends on warning either :)

comment:6 by robe, 8 years ago

Milestone: PostGIS 2.3.0PostGIS 2.2.3

comment:7 by robe, 8 years ago

Milestone: PostGIS 2.2.3PostGIS 2.3.0

I've decided shouldn't be done in micro, so will do in 2.3.0

comment:8 by robe, 8 years ago

Resolution: fixed
Status: newclosed

In 15096:

Revert ST_EstimatedExtent back to good ol'days when it returned WARNING instead of ERROR when no stats
Closes #3396

Note: See TracTickets for help on using tickets.