Skip to content

Commit ad12213

Browse files
authored
postgres plugins (#204)
1 parent cf73c82 commit ad12213

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

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

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
title: Manage PostgreSQL users and databases in Zerops
2+
title: Manage PostgreSQL users, databases and plugins
33
description: Learn how you can manage postgresql users and databases on Zerops.
44
---
55

6+
import { Dropdown, DropdownItem } from '/src/components/Dropdown';
7+
68
## Default database and user
79

810
Zerops creates a default database and a default user automatically when a new PostgreSQL service is [created](/postgresql/how-to/create).
@@ -146,3 +148,69 @@ psql -h [hostname] -U [user] -p [password] -d [database_name]
146148
:::caution
147149
Do not use SSL/TLS protocols when connecting to PostgreSQL over VPN. Zerops PostgreSQL is not configured to support these protocols. The security is assured by the VPN.
148150
:::
151+
152+
## How to install and manage PostgreSQL plugins
153+
154+
You can list all available PostgreSQL plugins by running the following query *(superuser privileges not required)*:
155+
156+
```sql
157+
SELECT * FROM pg_available_extensions ORDER BY name;
158+
```
159+
160+
To install plugins, you must **connect as a superuser** (`postgres`) and run the appropriate CREATE EXTENSION command. For example:
161+
162+
```sql
163+
CREATE EXTENSION pg_stat_statements;
164+
CREATE EXTENSION vector;
165+
CREATE EXTENSION postgis;
166+
```
167+
168+
:::warning
169+
Currently, it is not possible to add new plugins that are not already listed in `pg_available_extensions`.
170+
:::
171+
172+
When working with text search functionality, you'll need to reference the correct `stop`, `dict`, and `affix` files when creating dictionaries in your database. These files are essential for proper text search configuration.
173+
174+
Zerops PostgreSQL includes the following dictionary files:
175+
176+
<Dropdown>
177+
<DropdownItem title="Available dictionary files">
178+
**Stop word files** - used to remove common words that don't add significant meaning:
179+
```
180+
czech.stop
181+
danish.stop
182+
dutch.stop
183+
english.stop
184+
finnish.stop
185+
french.stop
186+
german.stop
187+
hungarian.stop
188+
italian.stop
189+
nepali.stop
190+
norwegian.stop
191+
polish.stop
192+
portuguese.stop
193+
russian.stop
194+
slovak.stop
195+
spanish.stop
196+
swedish.stop
197+
turkish.stop
198+
```
199+
**Dictionary and affix files** - used for stemming and word normalization:
200+
```
201+
cs_CZ.affix
202+
cs_CZ.dict
203+
en_US.affix
204+
en_US.dict
205+
pl_PL.affix
206+
pl_PL.dict
207+
sk_SK.affix
208+
sk_SK.dict
209+
```
210+
**Special rules file:**
211+
```
212+
unaccent.rules
213+
```
214+
</DropdownItem>
215+
</Dropdown>
216+
For more information on text search dictionaries, refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/16/textsearch-dictionaries.html).

apps/docs/sidebars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1852,7 +1852,7 @@ module.exports = {
18521852
{
18531853
type: 'doc',
18541854
id: 'postgresql/how-to/manage',
1855-
label: 'Manage users and databases',
1855+
label: 'Manage users, databases & plugins',
18561856
},
18571857
{
18581858
type: 'doc',

0 commit comments

Comments
 (0)