Skip to content
masterclass Buddy

PostgreSQL · Command

CREATE EXTENSION

CREATE EXTENSION installs an extension in the current database. It runs the extension script, records its objects, and can place them in a chosen schema.

Last updated

Syntax

CREATE EXTENSION [ IF NOT EXISTS ] extension_name [ WITH ] [ SCHEMA schema_name ] [ VERSION version ] [ CASCADE ]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • DROP EXTENSION
  • ALTER EXTENSION
  • pg_available_extensions
  • pg_available_extension_versions
  • CREATE SCHEMA

Source: CREATE EXTENSION. Checked 2026-11-03.