PolarDB for PostgreSQL integrates the always-confidential database feature by default, but you must explicitly enable it before use. This topic describes how to enable the feature.
Prerequisites
Before you begin, make sure you have:
-
A PolarDB for PostgreSQL cluster that supports the always-confidential database feature. For supported versions, see Prerequisites.
-
A privilege account. To create one, see Create a database account.
-
A database. To create one, see Create a database.
Enable the always-confidential database feature
-
Contact us to install and configure the always-confidential module to enable the always-confidential database module.
-
Connect to the database using a privileged account that has the permission to install extensions. Then, execute the following SQL statement to install the always-confidential extension and enable the confidential database:
NoteFor more information about connecting to a PolarDB for PostgreSQL database, see Connect to a database cluster.
-- Install the encdb extension CREATE EXTENSION encdb;
What's next
Before using the always-confidential database feature, define sensitive data based on your business requirements. See Define sensitive data.