[postgis-users] Addgeometrycolumn() for already created columns

Obe, Regina robe.dnd at cityofboston.gov
Tue Sep 4 05:50:23 PDT 2007


Webb,

Well actually when you do the below iyour centroid(the_geom) would be
created as a geometry field I think.

What AddGeometryColumn would do for you in addition to creating the
geometry field would be to add a record to the geometry_columns table
and also add constraints to the field to insure that say only points
would go in this field and they are of a particular SRID. 

I think there was some talk of in later versions making geometry_columns
a view or alternatively putting in a trigger at the creation of any
field that would automagically put in entries in geometry_columns.

I think making these work in a fairly reliable and speedy way will be
tricky.

Hope that helps,
Regina 

-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Webb
Sprague
Sent: Saturday, September 01, 2007 2:02 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Addgeometrycolumn() for already created columns

Is there any plans to write a function to add a geometry column after
it has been created, say with a "create table as select
centroid(the_geom) from foo" ?

Is there a reason why not?

Is this a silly or redundant question?

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

-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.




More information about the postgis-users mailing list