Skip to content

Commit 1152843

Browse files
committed
superuser for psql plugins
1 parent e0f2537 commit 1152843

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

apps/docs/content/postgresql/how-to/manage.mdx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,23 +108,27 @@ You can use various database management tools from your local workstation to con
108108

109109
## How to install and manage PostgreSQL plugins
110110

111+
### Viewing available plugins
111112
You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*:
112113

113114
```sql
114115
SELECT * FROM pg_available_extensions ORDER BY name;
115116
```
116117

117-
To install plugins, you must **connect as a superuser** (see note below) and run the appropriate CREATE EXTENSION command. For example:
118+
### Installing plugins (requires superuser)
118119

119-
```sql
120-
CREATE EXTENSION pg_stat_statements;
121-
CREATE EXTENSION vector;
122-
CREATE EXTENSION postgis;
123-
```
120+
1. **Connect with superuser credentials**:
121+
- Use the `superUser` (user `postgres`) and `superUserPassword` environment variables from your PostgreSQL service
124122

125-
:::info Superuser Credentials
126-
The PostgreSQL superuser credentials can be found in the `superUser` and `superUserPassword` environment variables of your PostgreSQL service.
127-
:::
123+
2. **Switch to your service database**:
124+
When logging in as the superuser, you're initially in the `postgres` database, not your service database.
125+
126+
3. **Install required extensions**:
127+
```sql
128+
CREATE EXTENSION pg_stat_statements;
129+
CREATE EXTENSION vector;
130+
CREATE EXTENSION postgis;
131+
```
128132

129133
:::warning
130134
Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`.

0 commit comments

Comments
 (0)