名称

DropGeometryColumn — 从空间表中移除geometry(几何)列。

大纲

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 字段相匹配。

[警告]

DropGeometryColumn is retained for backward compatibility and is not recommended for new applications. Use the standard ALTER TABLE ... DROP COLUMN command instead. The geometry_columns view updates automatically from the system catalogs.

此方法实现了 SQL 1.1 的 OGC 简单功能规范。

该函数支持 3d 并且不会丢失 z-index。

此方法支持圆形字符串和曲线。

Changed: 2.0.0. Retained for backward compatibility after geometry_columns became a view of the system catalogs.

示例

Use standard SQL to drop the geometry column. The geometry_columns view updates automatically.

Code
ALTER TABLE my_schema.my_spatial_table DROP COLUMN geom;

The legacy compatibility function performs the equivalent operation.

Code
SELECT DropGeometryColumn ('my_schema', 'my_spatial_table', 'geom');
栅格输出
my_schema.my_spatial_table.geom effectively removed.