[postgis-users] usage of AddGeometryColumn etc.

strk strk at keybit.net
Tue Jun 1 04:39:05 PDT 2004


On Tue, Jun 01, 2004 at 01:19:47PM +0200, Hubert Fröhlich wrote:
> Hi list,
> 
> I have a table with a geometry column.
> 
> 
> 
> test=# create table demo(col1 text);
> test=#  select AddGeometryColumn('', 'demo', 
> 'pgpoly','31494','MULTIPOLYGON',2);
>                                      
> addgeometrycolumn                                      
> ----------------------------------------------------------------------------------------------
> Geometry column pgpoly added to table public.demo WITH a SRID of 31494 
> and type MULTIPOLYGON
> (1 row)
> 
> When I drop the table without dropping the geometry column first
> 
> test=# drop table demo;
> DROP TABLE
> test=# select * from geometry_columns;
> f_table_catalog | f_table_schema | f_table_name | f_geometry_column | 
> coord_dimension | srid  |     type     | attrelid | varattnum | stats
> -----------------+----------------+--------------+-------------------+-----------------+-------+--------------+----------+-----------+-------
>                 | public         | demo         | pgpoly            
> |               2 | 31494 | MULTIPOLYGON |  5391696 |         3 |
> (1 row)
> 
> 
> 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.

What users think `bout this ?

---strk;

> b) If this is not possible, some hint in the documentation would be 
> useful .
> 
> Regards,
> 
> Hubert
> 
> -- 
> -------------------------------------------------------------------------------
> Dr.-Ing. Hubert Fröhlich			
> Bezirksfinanzdirektion München 			
> Alexandrastr. 3, D-80538 München, GERMANY
> Tel. :+49 (0)89 / 2190 - 2980
> Fax  :+49 (0)89 / 2190 - 2997
> hubert dot froehlich at bvv dot bayern dot de
> 
> 
> _______________________________________________
> 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