【问题标题】:ERROR: type "geometry" does not exist LINE 2: ADD COLUMN geom geometry(POINT,4326)错误:类型“几何”不存在第 2 行:添加列几何几何(点,4326)
【发布时间】:2019-04-22 21:01:22
【问题描述】:
ALTER TABLE public."MyData"
    ADD COLUMN geom geometry(POINT,4326)

执行上述查询时出现以下错误,

错误:类型“几何”不存在第 2 行:添加列几何 几何(POINT,4326)

请帮我解决这个问题

【问题讨论】:

    标签: postgresql postgis


    【解决方案1】:

    您必须先安装 PostGIS,在当前数据库中启用它并确保用户可以访问它。

    --is it installed?
    select postgis_version();
    
    -- enable postgis
    create extension postgis();
    
    -- ensure the schema containing PostGIS is in the user search path:
    show search_path;
    

    【讨论】:

    • 是的先生,我已经安装了,但我解决了这个问题,因为我忘记了扩展包含 postGis
    猜你喜欢
    • 2014-02-08
    • 1970-01-01
    • 1970-01-01
    • 2015-04-09
    • 2015-02-03
    • 2021-10-01
    • 2011-10-14
    • 2021-01-02
    • 2021-08-31
    相关资源
    最近更新 更多