-
Notifications
You must be signed in to change notification settings - Fork 796
Closed
Description
Describe the bug
If I execute a PostGIS query that returns geometry values, then click the "View all geometries in the column" button in the geometry column's header:
- If all selected geometries are non-empty, the Geometry Viewer will correctly open and map the geometries.
- But if one or more of the selected geometries are empty, the contents of that Query Tool tab go blank. Clicking anywhere in that blank tab has no effect, and the tab can't be closed.
To Reproduce
Steps to reproduce the behavior:
- Open a query tab.
- Load the PostGIS extension if it isn't already loaded:
CREATE EXTENSION postgis; - Execute the following query to return two rows, one with an empty geometry and the other with a non-empty one.
WITH intersections AS (
SELECT 'intersection of two different points' lbl,
ST_Intersection('POINT(0 0)', 'POINT(1 1)') geom
UNION ALL
SELECT 'intersection of two identical points' lbl,
ST_Intersection('POINT(2 2)', 'POINT(2 2)') geom
)
SELECT lbl,
ST_IsEmpty(geom), --a result of "true" confirms that the geometry is empty
ST_SetSrid(geom, 4326) --return the geometry so we can try to map it
FROM intersections;
- Select only the row for the non-empty geometry and click the "View all geometries in the column" button (screenshot 1, below). The Geometry Viewer should open and map the point (screenshot 2).
- Select the row for the empty geometry (and optionally the non-empty geometry) and click the "View all geometries in the column" button (screenshot 3). The entire tab shoud go blank and become nonresponsive (screenshot 4).
Expected behavior
I would expect the Geometry Viewer to open and for any non-empty geometries to be mapped while any empty geometries would be omitted from the map. If all selected geometries are empty I would expect a blank map, or alternatively, a notification that all selected geometries are empty.
Error message
I don't know if an error message is issued because I can't seet the Messages subtab of the Query tab, as the Query tab is blank and nonresponsive.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10 Pro
- Version: 10.0.19045
- Mode: Desktop
- pgAdmin4 version: 8.9
Hagfjall