PostgreSQL Cheat Sheet/Enable extension

Install an extension in the current database.

Section: Views, Functions, Triggers, and Extensions

Enable extension

sql
sql
CREATE EXTENSION IF NOT EXISTS pgcrypto;
Explanation

See summary for usage details.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Views, Functions, Triggers, and Extensions
Create database
Create a new database in the cluster.
OpenIn sheetsql1 tag match
Create schema
Create a namespace for objects.
OpenIn sheetsql1 tag match
Create database with owner
Create a database with explicit owner and template.
OpenIn sheetsql1 tag match
Create table
Create a basic table with primary key and defaults.
OpenIn sheetsql1 tag match
Create identity column
Use a SQL-standard identity column instead of serial.
OpenIn sheetsql1 tag match
Create login role
Create a role that can log in.
OpenIn sheetsql1 tag match