Dear all,
I think I've found a bug in Django and a solution :-)
In django/db/backends/postgresql/operations.py (svn)
there is a PostgreSQL version check that reads like this:
if self.postgres_version[0] >= 8 and self.postgres_version[1] >= 1
Bug: When PostgreSQL turns 9.0 (a year from now? ), the test will
yield False, since self.postgres_version[1] will hold 0.
Solution: Use Python's great sequence comparison syntax, something like:
if self.postgres_version[:] >= (8,1):
Thought about writing a function that specializes in checking
versions, but didn't find any additional value as the latter proposal.
I also looked for more uses of the string "postgres_version" in Django
source code, but besides the aforementioned, the only use is the
loading of postgres_version sequence itself, which does it job nicely.
Hope some developer finds this contribution useful, since I'm new here
but am trying hard to learn, and eventually, be able to contribute to
this Great project that Django is. My $0.02.-
Best regards to all
Haroldo.-
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---