-
-
Notifications
You must be signed in to change notification settings - Fork 221
Description
Tegola is using PGX to connect to Postgis enabled postgres database. By default, PGX handles standard libpq env variables like PGHOST, PGDATABASE, PGPORT, PGUSER, PGPASSWORD. However Tegola forces either hardcoding the connection url into the config file or manually setting interpolated env vars. This is clunky and unintuitive (especially if you have a password that contains a character that needs escaping) and could be solved by making the connection uri in the config file optional and allowing pgx to handle validating the connection. directly.
If multiple postgis providers are needed, postgres has a built in convention for this using the pgservicefile which is also supported by default by PGX without any additional configuration needed
an optional service
parameter could be added to allow switching between multiple providers. This way Tegola does not need to reinvent the wheel and manually handle what PGX can already do.