【问题标题】:PostGIS installed, but unable to select version or add geography columns已安装 PostGIS,但无法选择版本或添加地理列
【发布时间】:2018-10-09 23:16:47
【问题描述】:

我在 Google Cloud 上有一个现有的 Postgres 9.6 数据库,它启用了 PostGIS 扩展,但是每当我尝试使用 geography 类型的列创建表或选择 PostGIS 版本时,我都会收到错误。

对于创建 geography 列,错误是非描述性的 - 只是在以下语句中指向单词 geography 的箭头

create table place(coordinate geography(POINT,4326));

版本错误如下:

select postgis_full_version();
ERROR:  could not access file "$libdir/postgis-2.3": No such file or directory
CONTEXT:  SQL statement "SELECT postgis_lib_version()"
PL/pgSQL function postgis_full_version() line 22 at SQL statement

create extension 语句确认它已经安装,例如

create extension postgis;
error: the extension already exists

我尝试以postgres 用户和另一个已被授予相关数据库权限但似乎都不起作用的用户身份运行这些命令。任何帮助将不胜感激。

【问题讨论】:

    标签: postgresql postgis google-cloud-sql


    【解决方案1】:

    这比你想象的要简单: 您的托管服务提供商搞砸了 PostGIS 安装。

    该文件似乎确实丢失了,或者操作系统级别的其他内容配置错误。

    你应该抱怨 Google。

    【讨论】:

      猜你喜欢
      • 2019-09-20
      • 2020-02-23
      • 2016-05-19
      • 1970-01-01
      • 2013-02-20
      • 2019-11-07
      • 1970-01-01
      • 2014-04-09
      • 2020-12-10
      相关资源
      最近更新 更多