Opened 18 years ago
Closed 18 years ago
#6433 closed (fixed)
postgres backend doesn't accept version number 8.3RC2
| Reported by: | Trevor Caira | Owned by: | Jason Erickson |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
the postgres backend expects the parts of the postgres version number as reported by select version() to be both integers. however this is not always the case:
trevor=> select version();
version
-----------------------------------------------------------------------------------------------------------------
PostgreSQL 8.3RC2 on x86_64-pc-linux-gnu, compiled by GCC cc (GCC) 4.2.3 20080114 (prerelease) (Debian 4.2.2-7)
(1 row)
the fix is trivial, however. see attached.
Attachments (4)
Change History (15)
by , 18 years ago
| Attachment: | odd-version-string-fix.diff added |
|---|
comment:1 by , 18 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 18 years ago
| Resolution: | duplicate |
|---|---|
| Status: | closed → reopened |
| Triage Stage: | Unreviewed → Ready for checkin |
I'll reopen this one in favor of #6236, as this has a patch already.
comment:3 by , 18 years ago
The patch has a small issue in that with the string suggested in the ticket you'd get a postgres_version of [8, 33] which is, err, obviously wrong, though I'm not entirely sure what the correct answer would be to that - if we could gaurantee that the string RC was going to be in the RC versions, then we could do a check for RC in the version string, then take one off the version before it.
Otherwise, we could just ditch anything after the first character that's not a digit or a period, then parse that, which would give [8, 3] in this case. That might be a better solution.
comment:4 by , 18 years ago
| Patch needs improvement: | set |
|---|---|
| Triage Stage: | Ready for checkin → Accepted |
Reverting status per above comment.
by , 18 years ago
| Attachment: | postgres-funny-version2.diff added |
|---|
comment:5 by , 18 years ago
This patch just grabs the first \d+\.\d+ in select version() and calls that the version number.
by , 18 years ago
| Attachment: | postgres_version_fix.diff added |
|---|
Patch for postgres version that keeps with previous behaviour on "regular" version numbers and works with beta/RC versions
comment:6 by , 18 years ago
| Patch needs improvement: | unset |
|---|
Removed patch-need-improvement property as there's a new patch that hasn't been reviewed yet.
comment:7 by , 18 years ago
| Owner: | changed from to |
|---|---|
| Status: | reopened → new |
comment:8 by , 18 years ago
by , 18 years ago
| Attachment: | postgres-versions.diff added |
|---|
A new patch that works with RC/beta versions and Windows version strings
comment:9 by , 18 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Attached file postgres-versions.diff, modeled very similarly after the MySQL version check, that works for the windows version string as well as if the version string does not have a patch level (like in the above mentioned example).
comment:10 by , 18 years ago
I don't have any way to test this on Windows or an 8.3 beta version, but it looks fairly correct, so I'll commit a small variation on it and we can sort out the damage as people use it.
comment:11 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
duplicate of #6236.