[postgis-users] Incorrect geometry_columns?
    Sandro Santilli 
    strk at keybit.net
       
    Mon Dec 10 06:22:08 PST 2012
    
    
  
On Mon, Dec 10, 2012 at 01:02:46PM +0100, Nicolas Ribot wrote:
> To take advantage of the gc view, geometric tables have to be created with
> a typemod on the geometry type, to allow system to know both geoemtry's
> type and SRID.
> If you create the table by a "create table as select ...", you would have
> to alter the table to use the typemod:
> 
> create table test as select code_dept, st_centroid(geom) as geom from dept;
Or to cast on select (very useful with views..)
 create table test as select code_dept,
  st_centroid(geom)::geometry(point, 2154) as geom from dept;
--strk;
    
    
More information about the postgis-users
mailing list