The web page for Postgresql says that pgcrypto is included in the download for Postgresql 9.1. There is no pgcrypto.sql file, however. If I look in the share\extension directory there are 3 files:
pgcrypto--1.0.sql pgcrypto--unpackaged--1.0.sql pgcrypto.control
If I try to install with
\i pgcrypto--1.0.sql
I get a bunch of errors like this:
psql:pgcrypto--1.0.sql:194: ERROR: could not access file "MODULE_PATHNAME": No such file or directory
Maybe the files in share\extension were meant to be called by the share\contrib\pgcrypto.sql file (which doesn't exist).
On linux on Postgresql 8.4 I have to install the contrib package to get pgcrypto.sql. Is there another package I have to install on Windows for Postgresql 9.1?
Thanks.
In v9.1 the way to install extra modules was changed, those are now called EXTENSIONS and are installed with a special SQL statement CREATE EXTENSION.
1.add the extensions: create extension pgcrypto
2.check the extensions: select * from pg_available_extensions
3.use the extensions: select '{SHA}'||encode(digest('test', 'sha1'), 'base64');
If you need use some extension, the way is for example for pgcrypto: "CREATE EXTENSION pgcrypto" from a window query, but is very important to said that this script must be executed in the DB that you need to use this extension, after having finished the script to verify that it is installed, check in pgAdmin over your DB the extensions seccion.
I hope this help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With