21

I have Postgres version 10.5 from the docker hub and don't know how to install the pgcrypto module. In /usr/lib/postgresql/10/lib# there is a pgcrypto.so file. What to do with that file? I can't find documentation about it, thanks for your help!

2 Answers 2

62

Using PSQL or PgAdmin, connect to the DB and type

CREATE EXTENSION IF NOT EXISTS pgcrypto;
Sign up to request clarification or add additional context in comments.

Comments

2

Actually make sure to force SET search_path='required_schema'; (usually public). Otherwise "CREATE EXTENSION IF NOT EXISTS pgcrypto;" command will install pgcrypto functions to the first schema in search path of the current user.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.