Closed adarnimrod closed 4 years ago
The options in PostgreSQL seem to be https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
It seems we can either pass them directly in the connecton URL, or as a dictionary for the connect_args
argument.
They all seem to be strings (which makes sense given they can be passed in the URL or as environment variables) so we can even type-validate the config file while leaving the options arbitrary (to avoid having to maintain our own list of available options and updating it with each PostgreSQL release).
Allow setting database connection parameters from the configuration file (like
sslmode
). We can get by for now with using environment variables that libpq uses but it would be nicer to use the configuration file. An option likeparams
under thepostgresql
section that is a dictionary of the parameters is what I have in mind. Looking at https://docs.sqlalchemy.org/en/13/core/engines.html#custom-dbapi-args it seems like it's doable.