[postgis-users] DropGeometryColumn

Seamus Thomas Carroll carrolls at cpsc.ucalgary.ca
Thu Mar 18 10:34:07 PST 2004


If you delete a spatial table before using DropGeometryColumn the table
will still be mentioned in table geometry_columns.  If you forget to use
DropGeometryColumn before deleting your table you can manually remove
the row in geometry_columns that references your deleted table.  After
doing this you should no longer get the duplicate error.

geometry_columns keeps a record of all spatial tables created with the
help of AddGeometryColumn.  This makes it convenient to lookup all
spatial tables.

Seamus

On Thu, 18 Mar 2004, Jan Hartmann wrote:

> I don't know if I diagnosed this problem correctly, but I regularly
> stumble over the following situation:
>
>
> I create a spatial table, and delete it after some time. When I create a
> new spatial table under the same name, I get an error message about
> "duplicate geometry column names". It seems that before deleting a
> spatial table, you *have* to drop manually the geometry column of that
> table with DropGeometryColumn(). I don't know how to remove this column
> after deleting the table, so this leaves me with a database where I
> cannot create tables that have been deleted the wrong way.
>
> Am I right that this is how it works? If so, could it be remedied, e.g.
> by some sort of trigger on dropping a spatial table?
>
> Jan
> _______________________________________________
> 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