Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Postgresql始终报告在数据库中找不到存储类型_Postgresql_Python 2.7_Hstore - Fatal编程技术网

Postgresql始终报告在数据库中找不到存储类型

Postgresql始终报告在数据库中找不到存储类型,postgresql,python-2.7,hstore,Postgresql,Python 2.7,Hstore,我已经安装了hstore扩展。postgresql的版本是9.4.4,它是通过自制程序安装的 # \dx List of installed extensions Name | Version | Schema | Description ---------+---------+------------+------------------------------------------------

我已经安装了
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\u hstore(con)
时,它会报告
psycopg2.ProgrammingError:hs数据库中找不到存储类型。请从“contrib/hstore.sql”文件安装它

hstore.sql
文件位于
/usr/local/ceral/postgresql/9.4.4/share/postgresql/extension


任何帮助都将不胜感激

值得一查。。。当您尝试调用
register\hstore
时,是否确定您在正确的数据库中?@donkopotamus正在尝试检查它。我也怀疑我没有使用正确的数据库或用户。@donkopotamus似乎我刚才使用了错误的用户。现在这是正常的。请忽略这个问题。谢谢!:)