Search
ctrl/
Ask AI
Light
Dark
System

Extensions

Extensions are the way EdgeDB adds more functionality. In principle, extensions could add new types, scalars, functions, etc., but, more importantly, they can add new ways of interacting with the database.

There are a few built-in extensions available:

To enable these extensions, add a using statement at the top level of your schema:

Copy
using extension auth;

Additionally, standalone extension packages can be installed via the CLI.

List installed extensions:

Copy
$ 
edgedb extension list -I my_instance
┌─────────┬─────────┐
│ Name    │ Version │
└─────────┴─────────┘

List available extensions:

Copy
$ 
edgedb extension list-available -I my_instance
┌─────────┬───────────────┐
│ Name    │ Version       │
│ postgis │ 3.4.3+6b82d77 │
└─────────┴───────────────┘

Install the postgis extension:

Copy
$ 
edgedb extension install -I my_instance -E postgis
Found extension package: postgis version 3.4.3+6b82d77
00:00:03 [====================] 22.49 MiB/22.49 MiB
Extension 'postgis' installed successfully.

Check that extension is installed:

Copy
$ 
edgedb extension list -I my_instance
┌─────────┬───────────────┐
│ Name    │ Version       │
│ postgis │ 3.4.3+6b82d77 │
└─────────┴───────────────┘

After installing extensions, make sure to restart your instance:

Copy
$ 
edgedb instance restart -I my_instance

Standalone extensions can now be declared in the schema, same as built-in extensions.

To restore a dump that uses a standalone extension, that extension must be installed before the restore process.