DATABASE_OPTIONS ignored for postgresql_psycopg2
|Reported by:||rcoup||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Psycopg2 only looks in the kwargs passed to psycopg2.connect() if there is no dsn string. In django this means everything set in settings.DATABASE_OPTIONS is happily ignored (eg. sslmode) because _cursor() builds a dsn string.
The attached patch makes all the db params into a dictionary passed via kwargs instead.
Change History (7)
Changed 7 years ago by rcoup
comment:1 Changed 7 years ago by rcoup
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:5 Changed 6 years ago by mtredinnick
- Resolution set to fixed
- Status changed from new to closed