_cdb_estimated_extent: Adapt to ST_EstimatedExtent change
The behaviour was changed in Postgis 1.5.4 to return NULL instead of throwing
This commit is contained in:
parent
ac15a6da25
commit
7e131143f9
1
NEWS.md
1
NEWS.md
@ -1,5 +1,6 @@
|
||||
0.24.0 (2018-XX-XX)
|
||||
* Travis: Test with PostgreSQL 9.5 and 10.
|
||||
* _cdb_estimated_extent: Fix bug with ST_EstimatedExtent interaction.
|
||||
|
||||
0.23.2 (2018-07-19)
|
||||
* Fix `CDB_QueryTablesText` with parenthesized queries (#335)
|
||||
|
@ -93,11 +93,8 @@ AS $$
|
||||
table_id.schema_name, table_id.table_name, 'the_geom_webmercator'
|
||||
);
|
||||
|
||||
BEGIN
|
||||
EXECUTE ext_query INTO ext;
|
||||
EXCEPTION
|
||||
-- This is the typical ERROR: stats for "mytable" do not exist
|
||||
WHEN internal_error THEN
|
||||
EXECUTE ext_query INTO ext;
|
||||
IF ext IS NULL THEN
|
||||
-- Get stats and execute again
|
||||
EXECUTE format('ANALYZE %1$s', reloid);
|
||||
|
||||
@ -107,7 +104,7 @@ AS $$
|
||||
END IF;
|
||||
|
||||
EXECUTE ext_query INTO ext;
|
||||
END;
|
||||
END IF;
|
||||
|
||||
RETURN ext;
|
||||
END;
|
||||
|
Loading…
Reference in New Issue
Block a user