Reputation: 60
Documentation for postgres has hstore - hstore which delete matching pairs from left operand. Installed postgres extensions.
When I try
select public.hstore('"x"=>"30", "y"=>"c"') -
public.hstore('"x"=>"30","y"=>"fred"')
is error-ing with following
ERROR: operator does not exist: public.hstore - public.hstore
LINE 3: select public.hstore('"x"=>"30", "y"=>"c"') - public.hstore...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Upvotes: 1
Views: 3840
Reputation: 787
I ran into this issue as well, nothing worked for me from my code (worked via pgadmin - query). Eventually after looking at the functions within public I found this which worked for me.
public.fetchval(hstore, key)
Upvotes: 0
Reputation: 324751
You've installed the hstore
extension into the public
schema, which is not on your search_path
. To find the types you're schema-qualifying them but you're not qualifying the -
operator that works on those types.
This means that hstore
's operator definitions will not be found. You must:
OPERATOR(public.-)
;public
on the search_path
; orhstore
and then install it into its own dedicated schema that is on the search_path
.An example of schema-qualified operator syntax is:
SELECT 1 OPERATOR(pg_catalog.-) 2;
Upvotes: 6