Opened 3 years ago

Last modified 10 months ago

#3372 new defect

TopoElementArray cannot be null

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.2.8
Component: topology Version: 2.0.x
Keywords: Cc:


Trying to GetTopoElementArray? for an empty TopoGeometry fails due to NULL not passing the TopoElementArray? domain constraint:

t=# select null::topoelementarray;
ERROR:  value for domain topoelementarray violates check constraint "dimensions"

I think the check should allow for null...

Change History (4)

comment:1 Changed 3 years ago by strk

Now this is funny, I can create a NULL TopoElementArray? like this:

SELECT topology.TopoElementArray_agg(e)::TopoElementArray IS NULL from (        
  SELECT '{1,1}'::TopoElement WHERE false                                       
) as foo(e);

Now I wonder why the "dimensions" constraint only kicks in with a literal ! This is PostgreSQL 9.3.6.

The domain definition is here:

comment:2 Changed 16 months ago by pramsey

Milestone: PostGIS 2.0.8PostGIS 2.2.6

comment:3 Changed 15 months ago by pramsey

Milestone: PostGIS 2.2.6PostGIS 2.2.7

comment:4 Changed 10 months ago by robe

Milestone: PostGIS 2.2.7PostGIS 2.2.8
Note: See TracTickets for help on using tickets.