Opened 16 years ago

Closed 15 years ago

#4299 closed (fixed)

remove code duplication in postgresql and postgresql_psycopg2 backends

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Their and modules are almost identical and cause bugs to have to be fixed in both places.

Change History (10)

comment:1 Changed 16 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedAccepted

comment:2 Changed 16 years ago by bp@…

Resolution: fixed
Status: newclosed

Duplicated in #5106 and taken care of there, starting with [5949]?

comment:3 Changed 16 years ago by Barry Pederson <bp@…>

Resolution: fixed
Status: closedreopened

comment:4 Changed 16 years ago by Barry Pederson <bp@…>

Resolution: duplicate
Status: reopenedclosed

comment:5 Changed 16 years ago by Gary Wilson

Resolution: duplicate
Status: closedreopened

No duplication was removed from the modules listed in the ticket description though in all of that refactoring.

comment:6 Changed 16 years ago by Gary Wilson

(In [6165]) Refs #4299 -- Removed some code duplication in the postgresql introspection modules by letting the postgresql_psycopg2 backend use identical functions from the postgresql backend.

comment:7 Changed 16 years ago by Gary Wilson

Resolution: fixed
Status: reopenedclosed

The base modules don't really have that much duplication except for in the DatabaseWrapper class, and subclassing one from the other probably isn't worth it.

comment:8 Changed 16 years ago by Jason Yan

Resolution: fixed
Status: closedreopened

Fix imports from django.db.backends.postgresql.introspection, which imports db.backend.postgresql.base and thus psycopg in the psycopg2 backend.

comment:9 Changed 16 years ago by Gary Wilson

[6165] backed out in [6171].

comment:10 Changed 15 years ago by Malcolm Tredinnick

Resolution: fixed
Status: reopenedclosed

Doesn't look like there's anything much to do here any longer. Over the years, we've gradually moved more and more common stuff into django/db/backends/postgresql/. In particular, the introspection stuff in the psycopg2 backend inherits from the psycopg backend.

Note: See TracTickets for help on using tickets.
Back to Top