我已经安装了hstore
扩展程序。 postgresql的版本是9.4.4,它是通过自制软件安装的。
# \dx
List of installed extensions
Name | Version | Schema | Description
---------+---------+------------+--------------------------------------------------
hstore | 1.3 | public | data type for storing sets of (key, value) pairs
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
(2 rows)
但是当我尝试执行psycopg2.extras.register_hstore(con)
时,它会报告psycopg2.ProgrammingError: hstore type not found in the database. please install it from your 'contrib/hstore.sql' file
。
hstore.sql
文件位于/usr/local/Cellar/postgresql/9.4.4/share/postgresql/extension
。
任何帮助将不胜感激。