Opened 17 years ago
Closed 11 years ago
#10509 closed Bug (wontfix)
Better handling of database version-specific feature initialisation
| Reported by: | Malcolm Tredinnick | Owned by: | Christophe Pettus |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | richard.davies@… | Triage Stage: | Accepted |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Right now, we have problems such as those mentioned in #10467 (comment 4). If a part of Django wants to use a particular feature that depends on the database version, it needs to first have talked to the database. This breaks in some edge-cases.
Some alternative possibilities are
- understanding deferred-features, but that looks hard. For example, it's difficult to imagine how "return ID from insert" can work in that fashion without being really ugly code.
- requiring the settings file to include the version information so we don't have to make the wasteful
SELECT version();(or equivalent) call for every database connection. It's essentially unchanging information.
Anyway, that's a discussion for later (I'll start a thread on django-dev at some point). Opening the ticket to remind me to look at this.
Change History (9)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 17 years ago
| Cc: | added |
|---|
comment:4 by , 16 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:5 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → Bug |
comment:6 by , 11 years ago
| Resolution: | → wontfix |
|---|---|
| Status: | assigned → closed |
Django now support persistent connections, which alleviate the overhead of version checking. And Malcolm will never do what he had in mind.
Considering that there isn't a concrete proposal and that there hasn't been much activity in three years, I'm going to close this ticket.
(In [10065]) More fixing of PostgreSQL < 8.2 problems with the psycopg2 backend.
Affects the postgresql_psycopg2 backend only. We now don't use the
"RETURNING" syntax in SQL INSERT statements unless it's required by the
autocommit behaviour. This fixes an edge-case that could cause crashes
with earlier PostgreSQL versions, but the broader problem remains to be
fixed (which is #10509).
Fixed #10467. Refs #10509.