Files
supabase/apps/temp-docs/docs/guides/database/extensions.mdx
2022-04-26 14:17:19 +02:00

67 lines
1.4 KiB
Plaintext

---
id: extensions
title: Overview
description: Using Postgres extensions.
---
import ExtensionsComponent from '@site/src/components/Extensions'
import Tabs from '@theme/Tabs';
import TabsPanel from '@theme/TabsPanel';
Extensions are exactly as they sound - they "extend" the database with functionality which isn't part of the Postgres core.
Supabase has pre-installed some of the most useful open source extensions.
### Enable and disable extensions
<Tabs
defaultActiveId="UI"
values={[
{label: 'UI', value: 'UI'},
{label: 'SQL', value: 'SQL'},
]}>
<TabsPanel id="UI" label="UI">
```sh
1. Go to the Database page
2. Click on "Extensions" in the sidebar
3. Find the extension you would like to enable/disable
4. Click the toggle.
```
<video width="99%" muted playsInline controls={true}>
<source src="/docs/videos/toggle-extensions.mp4" type="video/mp4" muted playsInline />
</video>
</TabsPanel>
<TabsPanel id="SQL" label="SQL">
```sql
-- Example: enable the "pgtap" extension
create extension pgtap;
-- Example: disable the "pgtap" extension
drop extension pgtap;
```
Even though the SQL code is `create extension`, this is the equivalent of "enabling the extension".
To disable an extension you can call `drop extension`.
</TabsPanel>
</Tabs>
### Full list of extensions
Supabase is pre-configured with over 50 extensions. You can also install your own SQL extensions directly into the database through our SQL editor.
<ExtensionsComponent />