Postgres 没有 hstore 扩展

CYC*_*616 36 postgresql

我试图运行以下命令,但我抛出了任何错误。

template1=# CREATE EXTENSION hstore

ERROR: could not open extension control file "usr/share/postgreesql/9.2/extension/hstore.control": No such file or directory 
Run Code Online (Sandbox Code Playgroud)

似乎我需要下载 postgres-devel 软件包,但我不知道我到底错过了什么。我用这个命令安装了我的 postgres,所以我认为我需要的所有东西都会包含在一起。

sudo apt-get install postgres-9.2 
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激。谢谢你。

zwe*_*ets 47

hstore扩展,以及许多其他的扩展名,如立方体fuzzystrmatchUUID-OSSP,等等,都在包装postgresql-contrib,你可以安装使用你的PostgreSQL版本:

sudo apt-get install postgresql-contrib-9.2
Run Code Online (Sandbox Code Playgroud)

在标准的 Ubuntu 安装中,

sudo apt-get install postgresql postgresql-contrib
Run Code Online (Sandbox Code Playgroud)

将安装 PostgreSQL 及其贡献的扩展。