Home:ALL Converter>Postgresql always reports hstore type not found in the database

Postgresql always reports hstore type not found in the database

Ask Time:2015-10-06T05:38:57         Author:Old Panda

Json Formatter

I already got hstore extension installed. The version of postgresql is 9.4.4 and it was installed via homebrew.

# \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)

But when I tried to execute psycopg2.extras.register_hstore(con), it would report psycopg2.ProgrammingError: hstore type not found in the database. please install it from your 'contrib/hstore.sql' file.

The hstore.sql file locates at /usr/local/Cellar/postgresql/9.4.4/share/postgresql/extension.

Any help will be appreciated.

Author:Old Panda,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/32958337/postgresql-always-reports-hstore-type-not-found-in-the-database
yy