名前

DropGeometryColumn — ジオメトリカラムを空間テーブルから除去します。

概要

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.

このメソッドはOGC Simple Features Implementation Specification for SQL 1.1の実装です。

この関数は3次元に対応し、Z値を削除しません。

このメソッドは曲線ストリングと曲線に対応しています。

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.