[postgis-users] update Geometry_columns

strk at refractions.net strk at refractions.net
Thu Jun 16 10:59:34 PDT 2005


On Thu, Jun 16, 2005 at 01:07:16PM -0400, Mark Fenbers wrote:
> By "constraints" do you mean that it can be any type constraint, such as 
> a foreign-key constraint?  Or does it have to be a unique identifier 
> constraint?  If so, I can ALTER TABLE ADD COLUMN and add such a 
> constraint, but I don't know what to use for the naming convention used 
> by AddGeometryColumns() and probe_geometry_columns() that you speak 
> of...  Can you help me out. please?

I mean the constraints that AddGeometryColumn() add on the tables
"santified" as Features Tables. 

Suppose your geometry column is is named  'geom3', constraints are:
    "enforce_srid_geom3" CHECK (srid(geom3) = -1)
    "enforce_dims_geom3" CHECK (ndims(geom3) = 3)
    "enforce_geotype_geom3" CHECK (geometrytype(geom3) = 'POINT'::text OR geom3 IS NULL)

You can use \d against one of your "working" Feature Tables to see
this yourself.

It's not a practical path, really. You should avoid to
create new tables bypassing the AddGeometryColumn() step,
generally speaking.

--strk;

> strk at refractions.net wrote:
> 
> >probe_geometry_columns() works by reading constraints, and
> >expects these constraints to have a given naming convention.
> >This is what happen when AddGeometryColumn() is invoked.
> >
> >When you need to move data from a table to another
> >you have to make AddGeometryColumn() part of your flow,
> >or manually add entries in the geometry_columns table,
> >or - finally - set up constraints named as the ones created
> >by AddGeometryColumn() and invoke probe_geometry_column().
> >
> >--strk;
> >_______________________________________________
> >postgis-users mailing list
> >postgis-users at postgis.refractions.net
> >http://postgis.refractions.net/mailman/listinfo/postgis-users
> >
> > 
> >


> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list