#7699: postgresql8.3 on window "select version()" format
------------------------------+---------------------------------------------
Reporter: anonymous | Owner: nobody
Status: new | Milestone:
Component: Database wrapper | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------+---------------------------------------------
File "C:\Python25\Lib\site-
packages\django\db\backends\postgresql_psycopg2\base.py", line 57, in
cursor
postgres_version = [int(val) for val in
cursor.fetchone()[0].split()[1].split('.')]
ValueError: invalid literal for int() with base 10: '3,'
because "select version()" returns:
testdb=# select version();
version
-----------------------------------------------------
PostgreSQL 8.3.3, compiled by Visual C++ build 1400
(1 row)
i think the best way is use PQparameterStatus() or PQserverVersion(),
but psycopg2 not implement them.
other way is use "show server_version" insted of "select version()".
testdb=# show server_version;
server_version
----------------
8.3.3
(1 row)
--
Ticket URL: <http://code.djangoproject.com/ticket/7699>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---