[postgis-devel] [PostGIS] #944: typmod support for PostGIS geometry

PostGIS trac at osgeo.org
Mon Jun 20 02:39:04 PDT 2011


#944: typmod support for PostGIS geometry
-------------------------+--------------------------------------------------
 Reporter:  robe         |       Owner:  pramsey      
     Type:  enhancement  |      Status:  new          
 Priority:  medium       |   Milestone:  PostGIS 2.0.0
Component:  postgis      |     Version:  trunk        
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by robe):

 Mark,

 We haven't yet -- that's what he meant by "Rubber will hit the road in
 deciding how to ditch the table. "

 My somewhat controversial solution -- which I will submit soon is.

 1) Have no table just a view geometry_columns
 2) The view will use basically Paul's geometry_columns_v approach for
 geometries with type defined via typmod.

 3) For older geometries and for people that can't use typmod typed for
 whatever reason -- it will reads the types from the contraints.  I'm
 creating a function to do that, so basically the view will be like what
 Paul has except instead

 COALESCE(NULLIF(geometry_typmod_type(a.atttypmod), 'Geometry'),
 read_type_from_constraint_goes_here(schema,table,column), 'Geometry') As
 ...

 The COALESCE(NULLIF will essentially short-circuit so people using the
 typmod approach should not experience any speed penalty.  I haven't
 written the function to see how much if any of a speed penalty there would
 be for people with check constraint based type conformance.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/944#comment:30>
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-devel mailing list