Name

DropGeometryColumn — 从空间表中删除几何图形列。

Synopsis

text DropGeometryColumn(varchar table_name, varchar column_name);

text DropGeometryColumn(varchar schema_name, varchar table_name, varchar column_name);

text DropGeometryColumn(varchar catalog_name, varchar schema_name, varchar table_name, varchar column_name);

描述

从空间表中删除几何图形列。请注意,SCHEMA_NAME需要与GEOMETRY_COLUMNS表中表行的f_TABLE_SCHEMA字段匹配。

This method implements the OGC Simple Features Implementation Specification for SQL 1.1.

This function supports 3d and will not drop the z-index.

This method supports Circular Strings and Curves

[Note]

已更改:2.0.0提供此函数是为了向后兼容。既然GEOMETRY_COLUMNS现在是系统编目的视图,您就可以像删除任何其他表列一样使用 ALTER TABLE

示例

SELECT DropGeometryColumn ('my_schema','my_spatial_table','geom');
                        ----RESULT output ---
                                          dropgeometrycolumn
------------------------------------------------------
 my_schema.my_spatial_table.geom effectively removed.

-- In PostGIS 2.0+ the above is also equivalent to the standard
-- the standard alter table.  Both will deregister from geometry_columns
ALTER TABLE my_schema.my_spatial_table DROP column geom;
                

另请参阅

AddGeometryColumn, DropGeometryTable, Section 4.6.2, “几何图形_列视图”