Created
October 5, 2011 12:42
-
-
Save jaylevitt/1264334 to your computer and use it in GitHub Desktop.
ERROR: structure of query does not match function result type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create or replace function similarity(my_user_id int) | |
returns table(user_id int, similarity float) as $$ | |
begin | |
return query select similarity(my_user_id, 'default=>1'::hstore); | |
end; | |
$$ language plpgsql stable strict; | |
create or replace function similarity(my_user_id int, weightings hstore) | |
returns table(user_id int, similarity float) as $$ | |
begin | |
-- stuff that works | |
end | |
$$ language plpgsql stable strict; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment