django1/django/db/backends/postgresql_psycopg2
Anssi Kääriäinen 1893467784 Fixed #19274 -- Made db connection creation overridable in subclasses
Connection creation was done in db backend ._cursor() call. This
included taking a new connection if needed, initializing the session
state for the new connection and finally creating the connection.

To allow easier modifying of these steps in subclasses (for example to
support connection pools) the _cursor() now calls get_new_connection()
and init_connection_state() if there isn't an existing connection. This
was done for all non-gis core backends. In addition the parameters used
for taking a connection are now created by get_connection_params().

We should also do the same for gis backends and encourage 3rd party
backends to use the same pattern. The pattern is not enforced in code,
and as the backends are private API this will not be required by
documentation either.
2012-11-27 19:47:19 +02:00
..
__init__.py Added postgresql_psycopg2 backend, which is untested, just for a starting point 2006-05-16 23:27:07 +00:00
base.py Fixed #19274 -- Made db connection creation overridable in subclasses 2012-11-27 19:47:19 +02:00
client.py Deprecated the psycopg-based postgresql database backend. 2011-04-02 08:39:08 +00:00
creation.py Used symbolic constants for psycopg2 isolation levels. 2011-11-19 14:18:44 +00:00
introspection.py Made get_table_description also return the size of char fields on SQLite 2012-08-30 19:36:05 +02:00
operations.py Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables. 2012-07-24 17:24:16 -03:00
version.py Fixed #11065, #11285 -- Streamlined PostgreSQL version detection, fixing incompatibility with multi-db. Thanks findepi for the report. 2011-06-19 18:00:09 +00:00