[postgis-users] Do I always have to use AddGeometryColumn?

Galen Ward galen at shackprices.com
Wed May 24 10:17:22 PDT 2006


Sort of a newbie question here: The PostGis manual
(http://www.postgis.org/docs/ch03.html#id2917099) seems to indicate that I
always have to use the AddGeometryColumn function to properly create
metadata and spatial fields, but that makes it difficult to backup and move
databases.  Will the same tables be created from a dump?  I.E. can I use
this to create a table:

	...
	  the_geom geometry,
	  CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
	  CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom)
= 	'POINT'::text OR the_geom IS NULL),
	  CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = 4269
	...

Instead of this:

	AddGeometryColumn(...)?

Thanks for your help!

-Galen




More information about the postgis-users mailing list