databases
databases copied to clipboard
Not define the name of the application via DSN "application_name=my_app_name"
Hello, Could you tell me please, why I can't add application_name via DSN?
My DSN looks like:
from databases import Database
dsn = (
f'postgresql://{user_name}:{password}'
f'@{host}:{port}/{my_db_name}'
f'?application_name=my_app_name'
)
db = Database(dsn)
Version:
- databases = "^0.3.1"
Hi! Easy-peasy. https://github.com/encode/databases/blob/master/databases/backends/postgres.py#L43
The workaround is to Database(dsn, **kwargs)
and dsn.rsplit("&?")
.
Thanks.. I Try. :-)