Opened 16 years ago
Closed 13 years ago
#11065 closed Cleanup/optimization (fixed)
Improve version comparison functions, esp for PostgreSQL
Reported by: | Russell Keith-Magee | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The PostgreSQL backend currently implements a get_version function that returns a tuple (e.g., (8,3,1) ) that describes the version of the PostgreSQL server. This version tuple is then used in many locations to determine feature availability - for example, between 8.2 and 8.2.4, STDDEV_POP is known to be broken, and errors will be raised.
Version comparisons are implemented in multiple locations, using different techniques. This should be cleaned up and improved so that the process of identifying versions can be improved without affecting the version comparisons that are required. This probably means writing a function that returns -1/0/1 comparing one version to another version.
This is an offshoot of #10842 - more discussion and context is available on that ticket.
Change History (3)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 13 years ago
Severity: | → Normal |
---|---|
Type: | → Cleanup/optimization |
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In [16439]: