Enabling Cryptographic Functions for PostgreSQL (pgcrypto)

pgcrypto is a package extension included in your HAWQ distribution. You must explicitly enable the cryptographic functions to use this extension.

Prerequisites

Before you enable the pgcrypto software package, make sure that your HAWQ database is running, you have sourced greenplum_path.sh, and that the $GPHOME environment variable is set.

Enable pgcrypto

On every database in which you want to enable pgcrypto, run the following command:

$ psql -d <dbname> -f $GPHOME/share/postgresql/contrib/pgcrypto.sql

Replace <dbname> with the name of the target database.

Disable pgcrypto

The uninstall_pgcrypto.sql script removes pgcrypto objects from your database. On each database in which you enabled pgcrypto support, execute the following:

$ psql -d <dbname> -f $GPHOME/share/postgresql/contrib/uninstall_pgcrypto.sql

Replace <dbname> with the name of the target database.

Note: This script does not remove dependent user-created objects.