2013-06-21 46 views
1

不能使用?運營商。工作正常的PostgreSQL 9.1.9(開發),失敗的9.2.4(生產)postgresql 9.2.4 hstore搜索關鍵字未知運營商

test=# SELECT 'a=>1,b=>2'::hstore ?| ARRAY['b','c']; 
ERROR: operator does not exist: hstore ?| text[] 
LINE 1: SELECT 'a=>1,b=>2'::hstore ?| ARRAY['b','c']; 
           ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. 

hstore安裝

test=# create extension hstore; 
ERROR: type "hstore" already exists 

回答

2

create extension hstore的錯誤信息表明你實際上並不具備分機hstore已安裝,只是其內容的一部分。 (否則,錯誤信息將是extension "hstore" already exists。)所以我建議你修復你的hstore安裝。它可能會工作做CREATE EXTENSION hstore FROM unpackaged。如果沒有,您將不得不做手動手術來移除或添加缺失的部分。

+0

CREATE EXTENSION hstore FROM unpackaged; 錯誤:函數hstore_recv(內部)不存在 – edbond

+0

我認爲它在postgresql從8.x升級後壞掉了 – edbond