[postgis-users] usage of AddGeometryColumn etc.
Wood Brent
pcreso at pcreso.com
Tue Jun 1 12:05:56 PDT 2004
> > I learn that DROP TABLE did not remove my geometry fully - I have to
> > - either delete the entry in geometry_columns.
> > - or execute a DropGeometryColumn(....) before DROPing the table.
> >
> > a) It would be quite comfortable just DROPping tables ... Is it intended
> > or possible to improve the functions this way?
>
> Not intended.
> Postgresql guys does not approve triggers on system catalogues.
>
> Maybe, the next AddGeoemtryColumn call could 'detect' those
> spurious records in geometry_columns and get rid of them, or
> just always replace records there.
I have a stored query called drop_geo_table which does a clean removal of the
geometry_column entry & then the actual table.
I think a similar built in function, such as DropGeometryTable() (which would
call DropGeometryColmn(), then drop the table) or an argument to
DropGeometryColumn() to drop the table after removing the record would be a
simple way to provide the functionality.
I'm less comfortable with a possible future call to AddGeometryTable being used
to tidy things up. I'd sooner have a Drop... function which did a tidy drop.
Not all Drops will necessarily be followed by an Add, so the spurious record
would just hang around...
Brent Wood
More information about the postgis-users
mailing list