I'm getting below error while using hmac method in postgres. Please help.
root@go=# SELECT HMAC('MyPassword','mykey','md5');
ERROR: 42883: function hmac(unknown, unknown, unknown) does not exist
LINE 1: SELECT HMAC('MyPassword','mykey','md5');
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
LOCATION: ParseFuncOrColumn, parse_func.c:523
Time: 0.703 ms
Two possibilities:
You never installed pgcrypto with CREATE EXTENSION
.
You installed pgcrypto in a schema that is not on the search_path
of database user root
.