[postgis-users] DropGeometryColumn

strk strk at keybit.net
Thu Mar 18 10:05:59 PST 2004


On Thu, Mar 18, 2004 at 06:42:20PM +0100, 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?

I think it could be done applying a trigger from
AddGeometryColumn(). Unfortunately the trigger(s) will 
have to be hooked on system tables, which postgresql guys
does not like. You can nonetheless try that out and let 
us know.

--strk;



More information about the postgis-users mailing list