[postgis-tickets] [PostGIS] #3372: TopoElementArray cannot be null

PostGIS trac at osgeo.org
Tue Nov 17 11:40:39 PST 2020


#3372: TopoElementArray cannot be null
-----------------------+---------------------------
  Reporter:  strk      |      Owner:  strk
      Type:  defect    |     Status:  new
  Priority:  medium    |  Milestone:  PostGIS 3.0.3
 Component:  topology  |    Version:  2.0.x
Resolution:            |   Keywords:
-----------------------+---------------------------

Comment (by robe):

 Still doesn't work on PostgreSQL 13.

 Is there a reason we can't just change the constraint to:


 {{{
 ALTER DOMAIN topology.topoelementarray DROP CONSTRAINT  dimensions;
 ALTER DOMAIN topology.topoelementarray
     ADD CONSTRAINT dimensions CHECK ( array_upper(VALUE, 2) = 2 AND
 array_upper(VALUE, 3) IS NULL);

 }}}

 Then the NULL thing wouldn't violate because NULL is special. Then the
 below works.


 {{{
 SELECT null::topoelementarray;
 }}}

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3372#comment:9>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list