From ed6f16840828e427d7bac48636290d7799aa4c80 Mon Sep 17 00:00:00 2001 From: Jeremy Lin Date: Mon, 6 Mar 2023 01:35:38 -0800 Subject: [PATCH] add docs on additional connection parameters --- Using-the-PostgreSQL-Backend.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Using-the-PostgreSQL-Backend.md b/Using-the-PostgreSQL-Backend.md index 97768f1..0ef68af 100644 --- a/Using-the-PostgreSQL-Backend.md +++ b/Using-the-PostgreSQL-Backend.md @@ -8,6 +8,8 @@ DATABASE_URL=postgresql://[[user]:[password]@]host[:port][/database] ``` An example docker run environment variable would be: ```-e 'DATABASE_URL=postgresql://user_name:user_password@db_host:5432/vaultwarden'```. +If you need to set additional connection parameters, note that the `DATABASE_URL` value ends up getting parsed by `libpq`, so you can use any of the parameters listed in the `libpq` [docs](https://www.postgresql.org/docs/current/libpq-envars.html). You can either add the connection parameter to `DATABASE_URL` or specify it via its corresponding `PG*` environment variable. If running under Docker, keep in mind that any paths provided need to be from the perspective of the Docker container, not the Docker host. + If you want to use a custom schema/search-path you need to use the following connection string:
Note the URL-encoded characters such as `%20` for the space and `%3D` for `=` sign ```ini