postgis之Polygon/MultiPolygon in a single column;面和多面存储在一个字段

postgresql空间字段存储多种不同类型polygon、multipolygon等情况

创建表时

CREATE table my_table(
  gid serial primary key,
  geom geometry(Polygon,4326)
);

修改已有表

ALTER TABLE my_table ALTER COLUMN geom TYPE geometry(Geometry,4326);

INSERT INTO my_table(geom)
VALUES
  ('SRID=4326;POLYGON EMPTY'),
  ('SRID=4326;MULTIPOLYGON EMPTY');

1 Response

  1. I loved as much as you will receive carried out right here.
    The sketch is tasteful, your authored subject matter
    stylish. nonetheless, you command get got an impatience over that you wish be delivering the following.
    unwell unquestionably come more formerly again since
    exactly the same nearly a lot often inside case you shield this hike.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

CAPTCHAis initialing...