The error comes from Postgres, it seems like a visibility issue.
The optional fuzzystrmatch module must be installed, of course. You obviously did this, or your function call will not work in psql either.
If it works in psql but not in your application, there are only a few possible explanations. The obvious first:
Are you connected to the same database? (Same server, same port, same db?)
Are you connecting to one user? Probably not ...
If you are connecting to another user (but in any case), check if you are working with the same search path. Run in any connection and compare:
SHOW search_path;
Details - and how to set search_path :
Keep in mind that extensions can be installed in any circuit of your choice. By default, this is the first scheme in search_path (the "current scheme" at the time of installation, which is usually public , but I do not know about this installation. Documentation:
If not specified, and the extension control file does not specify a scheme, or the current default object creation scheme is used.
Run this to diagnose a few things:
SELECT e.extname AS extension, nsp.nspname AS schema , r.rolname AS schema_owner, nsp.nspacl AS schema_acl FROM pg_extension e JOIN pg_namespace nsp ON nsp.oid = e.extnamespace JOIN pg_roles r ON r.oid = nsp.nspowner
You get something like:
extension | schema | schema_owner | schema_acl ---------------+------------+--------------+------------------------------------- adminpack | pg_catalog | postgres | {postgres=UC/postgres,=U/postgres} plpgsql | pg_catalog | postgres | {postgres=UC/postgres,=U/postgres} fuzzystrmatch | public | postgres | {postgres=UC/postgres,=UC/postgres} tablefunc | public | postgres | {postgres=UC/postgres,=UC/postgres} ...
If schema_acl includes =U/postgres ( U for USAGE ), then the public role has access, i.e. all.
Set search_path for your connection accordingly or (re) set it to the visible scheme and it should work.
Theoretically, the owning role or superuser can revoke the EXECUTE permission of the function itself ...