patternMinor
In RDS digest function is undefined after creating pgcrypto extension
Viewed 0 times
aftercreatingfunctionundefinedextensiondigestrdspgcrypto
Problem
On an AWS RDS instance, we have run
The extension gets created. Both queries:
Gives the error function public.digest(unknown, unknown) does not exist
CREATE EXTENSION pgcrypto;The extension gets created. Both queries:
SELECT digest('a', 'sha256') FROM table_name;
SELECT public.digest('a', 'sha256') FROM table_name;Gives the error function public.digest(unknown, unknown) does not exist
Solution
My coworker discovered the issue, in case anyone is having a similar problem, the issue was that pgcrypto had been installed into a schema that was not public. So the query for reported installed extensions said it was installed, installing if not exists did not change its schema or install it to all schemas. The final solution was to remove it from all schemas and install it directly in the public schema.
Context
StackExchange Database Administrators Q#135093, answer score: 5
Revisions (0)
No revisions yet.