0

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
Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
Thavaprakash Swaminathan
  • 6,226
  • 2
  • 30
  • 31

1 Answers1

3

Two possibilities:

  1. You never installed pgcrypto with CREATE EXTENSION.

  2. You installed pgcrypto in a schema that is not on the search_path of database user root.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263