问题描述
我在Google Cloud上已有一个启用了PostGIS扩展名的Postgres 9.6数据库,但是,每当我尝试创建具有geography
类型的列的表或选择PostGIS版本时,都会出现错误. /p>
对于创建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
用户和另一个被授予有关数据库权限但似乎都不起作用的用户身份运行这些命令.任何帮助将不胜感激.
它比您想象的要简单:您的托管特权者已经搞砸了PostGIS安装.
文件似乎真的丢失了,或者操作系统级别的其他东西配置不正确.
您应该在Google上大吃一惊.
I've got an existing Postgres 9.6 database on Google Cloud that has the PostGIS extension enabled, however whenever I try to create a table with a column with the geography
type or select the PostGIS version I get an error.
For creating the geography
column the error is non-descriptive — just an arrow pointing to the word geography
in the following statement
create table place(coordinate geography(POINT,4326));
The version error looks as follows:
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
The create extension
statement confirms it is already installed though e.g
create extension postgis;
error: the extension already exists
I've tried running these commands as the postgres
user and as another user who's been granted permissions on the database in question but neither seem to work. Any help would be appreciated.
It's simpler than you think:Your hosting privider has goofed up the PostGIS installation.
It looks like the file is really missing, or something else on the operating system level is misconfigured.
You should gripe at Google.
这篇关于已安装PostGIS,但无法选择版本或添加地理列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!