Skip to content

Commit 47041fa

Browse files
authored
Merge pull request #249678 from mulander/fix-flex-pgvector-usage
Fix instructions for enabling/dropping pgvector
2 parents 59c4fc0 + 098fc5e commit 47041fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

articles/postgresql/flexible-server/how-to-use-pgvector.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,16 @@ ms.date: 05/09/2023
1919

2020
## Enable extension
2121

22-
To install the extension, run the [CREATE EXTENSION](https://www.postgresql.org/docs/current/static/sql-createextension.html) command from the psql tool to load the packaged objects into your database.
22+
Before you can enable `pgvector` on your Flexible Server, you need to add it to your allowlist as described in [how to use PostgreSQL extensions](./concepts-extensions.md#how-to-use-postgresql-extensions) and check if it's correctly added by running `SHOW azure.extensions;`.
23+
24+
Then you can install the extension, by connecting to your target database and running the [CREATE EXTENSION](https://www.postgresql.org/docs/current/static/sql-createextension.html) command. You need to repeat the command separately for every database you want the extension to be available in.
2325

2426
```postgresql
2527
CREATE EXTENSION vector;
2628
```
2729

2830
> [!Note]
29-
> To disable an extension use `drop_extension()`
31+
> To remove the extension from the currently connected database use `DROP EXTENSION vector;`.
3032
3133
[!INCLUDE [`pgvector`](../../cosmos-db/postgresql/includes/pgvector-basics.md)]
3234

0 commit comments

Comments
 (0)